mirror of
https://github.com/Karaka-Management/oms-StockTaking.git
synced 2026-01-11 18:38:39 +00:00
fix tests
This commit is contained in:
parent
2ceb88c453
commit
8af158bc6f
|
|
@ -21,7 +21,7 @@ final class AdminTest extends \PHPUnit\Framework\TestCase
|
||||||
{
|
{
|
||||||
protected const NAME = 'StockTaking';
|
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;
|
use \tests\Modules\ModuleTestTrait;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -83,9 +83,12 @@ final class Autoloader
|
||||||
}
|
}
|
||||||
|
|
||||||
$class2 = $class;
|
$class2 = $class;
|
||||||
|
$class3 = $class;
|
||||||
|
|
||||||
$pos = \stripos($class, '/');
|
$pos = \stripos($class, '/');
|
||||||
if ($pos !== false) {
|
if ($pos !== false) {
|
||||||
|
$class3 = \substr($class, $pos + 1);
|
||||||
|
|
||||||
$pos = \stripos($class, '/', $pos + 1);
|
$pos = \stripos($class, '/', $pos + 1);
|
||||||
|
|
||||||
if ($pos !== false) {
|
if ($pos !== false) {
|
||||||
|
|
@ -94,7 +97,7 @@ final class Autoloader
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (self::$paths as $path) {
|
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;
|
include_once $file;
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user