Update bootstrap file for phpunit to work with different folder layouts
we have the autoloader in different base folders for some dev work
This commit is contained in:
@@ -1,5 +1,15 @@
|
||||
<?php
|
||||
|
||||
require dirname(__DIR__) . '../../www/vendor/autoload.php';
|
||||
$set = 0;
|
||||
foreach (['/../..', '/..', '/../../www', '/../www'] as $src) {
|
||||
if (is_file(dirname(__DIR__) . $src . '/vendor/autoload.php')) {
|
||||
require dirname(__DIR__) . $src . '/vendor/autoload.php';
|
||||
$set = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!$set) {
|
||||
die("Cannot find /vendor/autoload.php in reference to: " . dirname(__DIR__));
|
||||
}
|
||||
|
||||
// __END__
|
||||
|
||||
Reference in New Issue
Block a user