|
4 | 4 |
|
5 | 5 | use mageekguy\atoum; |
6 | 6 |
|
7 | | -require_once __DIR__ . '/vendor/hoa/core/Core.php'; |
| 7 | +$vendorDirectory = __DIR__ . '/vendor'; |
| 8 | + |
| 9 | +if (is_dir($vendorDirectory) === false) |
| 10 | +{ |
| 11 | + $vendorDirectory = __DIR__ . '/../..'; |
| 12 | +} |
| 13 | + |
| 14 | +if (is_file($vendorAutoloader = $vendorDirectory . '/hoa/core/Core.php')) { |
| 15 | + require_once $vendorDirectory . '/hoa/core/Core.php'; |
| 16 | +} |
8 | 17 |
|
9 | 18 | atoum\autoloader::get() |
10 | 19 | ->addNamespaceAlias('atoum\ruler', __NAMESPACE__) |
11 | | - ->addDirectory(__NAMESPACE__, __DIR__ . DIRECTORY_SEPARATOR . 'classes') |
12 | | - ->addDirectory('Hoa\Core', __DIR__ . DIRECTORY_SEPARATOR . 'vendor/hoa/core') |
13 | | - ->addDirectory('Hoa\Compiler', __DIR__ . DIRECTORY_SEPARATOR . 'vendor/hoa/compiler') |
14 | | - ->addDirectory('Hoa\File', __DIR__ . DIRECTORY_SEPARATOR . 'vendor/hoa/file') |
15 | | - ->addDirectory('Hoa\Iterator', __DIR__ . DIRECTORY_SEPARATOR . 'vendor/hoa/iterator') |
16 | | - ->addDirectory('Hoa\Math', __DIR__ . DIRECTORY_SEPARATOR . 'vendor/hoa/math') |
17 | | - ->addDirectory('Hoa\Regex', __DIR__ . DIRECTORY_SEPARATOR . 'vendor/hoa/regex') |
18 | | - ->addDirectory('Hoa\Ruler', __DIR__ . DIRECTORY_SEPARATOR . 'vendor/hoa/ruler') |
19 | | - ->addDirectory('Hoa\Stream', __DIR__ . DIRECTORY_SEPARATOR . 'vendor/hoa/stream') |
20 | | - ->addDirectory('Hoa\String', __DIR__ . DIRECTORY_SEPARATOR . 'vendor/hoa/string') |
21 | | - ->addDirectory('Hoa\Visitor', __DIR__ . DIRECTORY_SEPARATOR . 'vendor/hoa/visitor') |
| 20 | + ->addDirectory(__NAMESPACE__, __DIR__ . '/classes') |
| 21 | + ->addDirectory('Hoa\Core', $vendorDirectory . '/hoa/core') |
| 22 | + ->addDirectory('Hoa\Compiler', $vendorDirectory . '/hoa/compiler') |
| 23 | + ->addDirectory('Hoa\File', $vendorDirectory . '/hoa/file') |
| 24 | + ->addDirectory('Hoa\Iterator', $vendorDirectory . '/hoa/iterator') |
| 25 | + ->addDirectory('Hoa\Math', $vendorDirectory . '/hoa/math') |
| 26 | + ->addDirectory('Hoa\Regex', $vendorDirectory . '/hoa/regex') |
| 27 | + ->addDirectory('Hoa\Ruler', $vendorDirectory . '/hoa/ruler') |
| 28 | + ->addDirectory('Hoa\Stream', $vendorDirectory . '/hoa/stream') |
| 29 | + ->addDirectory('Hoa\String', $vendorDirectory . '/hoa/string') |
| 30 | + ->addDirectory('Hoa\Visitor', $vendorDirectory . '/hoa/visitor') |
22 | 31 | ; |
0 commit comments