mirror of
https://github.com/Karaka-Management/oms-Monitoring.git
synced 2026-01-23 05:48:42 +00:00
fix tests
This commit is contained in:
parent
4eecbfbd38
commit
57672a2bd2
|
|
@ -34,7 +34,6 @@ final class Autoloader
|
|||
*/
|
||||
private static $paths = [
|
||||
__DIR__ . '/../',
|
||||
__DIR__ . '/../MainRepository/',
|
||||
__DIR__ . '/../../',
|
||||
];
|
||||
|
||||
|
|
@ -78,27 +77,8 @@ final class Autoloader
|
|||
$class = \ltrim($class, '\\');
|
||||
$class = \strtr($class, '_\\', '//');
|
||||
|
||||
if (\stripos($class, 'Web/Backend') !== false || \stripos($class, 'Web/Api') !== false) {
|
||||
$class = \str_replace('Web/', 'Install/Application/', $class);
|
||||
}
|
||||
|
||||
$class2 = $class;
|
||||
|
||||
$pos = \stripos($class, '/');
|
||||
if ($pos !== false) {
|
||||
$pos = \stripos($class, '/', $pos + 1);
|
||||
|
||||
if ($pos !== false) {
|
||||
$class2 = \substr($class, $pos + 1);
|
||||
}
|
||||
}
|
||||
|
||||
foreach (self::$paths as $path) {
|
||||
if (\is_file($file = $path . $class2 . '.php')) {
|
||||
include_once $file;
|
||||
|
||||
return;
|
||||
} elseif (\is_file($file = $path . $class . '.php')) {
|
||||
if (\is_file($file = $path . $class . '.php')) {
|
||||
include_once $file;
|
||||
|
||||
return;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user