mirror of
https://github.com/Karaka-Management/oms-Monitoring.git
synced 2026-02-12 23:38:41 +00:00
fix tests
This commit is contained in:
parent
4eecbfbd38
commit
57672a2bd2
|
|
@ -34,7 +34,6 @@ final class Autoloader
|
||||||
*/
|
*/
|
||||||
private static $paths = [
|
private static $paths = [
|
||||||
__DIR__ . '/../',
|
__DIR__ . '/../',
|
||||||
__DIR__ . '/../MainRepository/',
|
|
||||||
__DIR__ . '/../../',
|
__DIR__ . '/../../',
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
@ -78,27 +77,8 @@ final class Autoloader
|
||||||
$class = \ltrim($class, '\\');
|
$class = \ltrim($class, '\\');
|
||||||
$class = \strtr($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) {
|
foreach (self::$paths as $path) {
|
||||||
if (\is_file($file = $path . $class2 . '.php')) {
|
if (\is_file($file = $path . $class . '.php')) {
|
||||||
include_once $file;
|
|
||||||
|
|
||||||
return;
|
|
||||||
} elseif (\is_file($file = $path . $class . '.php')) {
|
|
||||||
include_once $file;
|
include_once $file;
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user