fix tests

This commit is contained in:
Dennis Eichhorn 2023-09-27 14:42:42 +00:00
parent 2ceb88c453
commit 8af158bc6f
2 changed files with 5 additions and 2 deletions

View File

@ -21,7 +21,7 @@ final class AdminTest extends \PHPUnit\Framework\TestCase
{
protected const NAME = 'StockTaking';
protected const URI_LOAD = 'http://127.0.0.1/en/warehouse/stocktaking';
protected const URI_LOAD = 'http://127.0.0.1/en/backend/warehouse/stocktaking';
use \tests\Modules\ModuleTestTrait;
}

View File

@ -83,9 +83,12 @@ final class Autoloader
}
$class2 = $class;
$class3 = $class;
$pos = \stripos($class, '/');
if ($pos !== false) {
$class3 = \substr($class, $pos + 1);
$pos = \stripos($class, '/', $pos + 1);
if ($pos !== false) {
@ -94,7 +97,7 @@ final class Autoloader
}
foreach (self::$paths as $path) {
if (\is_file($file = $path . $class2 . '.php')) {
if (\is_file($file = $path . $class2 . '.php') && \stripos($file, $class3) !== false) {
include_once $file;
return;