[CHANGED] "tests/bootstrap.php".
This commit is contained in:
parent
2c81d5f38b
commit
06d6b715a3
|
|
@ -23,16 +23,10 @@ if (!defined('PHPWORD_TESTS_BASE_DIR')) {
|
||||||
}
|
}
|
||||||
|
|
||||||
$vendor = realpath(__DIR__ . '/../vendor');
|
$vendor = realpath(__DIR__ . '/../vendor');
|
||||||
|
if (file_exists($vendor . '/autoload.php')) {
|
||||||
if (file_exists($vendor . "/autoload.php")) {
|
require $vendor . '/autoload.php';
|
||||||
require $vendor . "/autoload.php";
|
|
||||||
} else {
|
} else {
|
||||||
$vendor = realpath(__DIR__ . '/../../../');
|
throw new Exception('Unable to load dependencies');
|
||||||
if (file_exists($vendor . "/autoload.php")) {
|
|
||||||
require $vendor . "/autoload.php";
|
|
||||||
} else {
|
|
||||||
throw new Exception("Unable to load dependencies");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
spl_autoload_register(function ($class) {
|
spl_autoload_register(function ($class) {
|
||||||
|
|
@ -49,5 +43,5 @@ spl_autoload_register(function ($class) {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
require_once __DIR__ . "/../src/PhpWord/Autoloader.php";
|
require_once __DIR__ . '/../src/PhpWord/Autoloader.php';
|
||||||
\PhpOffice\PhpWord\Autoloader::register();
|
\PhpOffice\PhpWord\Autoloader::register();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue