mirror of
https://github.com/Karaka-Management/oms-Organization.git
synced 2026-02-17 08:48:40 +00:00
fix tests
This commit is contained in:
parent
d621f3faca
commit
2098eb832a
|
|
@ -52,15 +52,6 @@ return [
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
'^.*/organization/unit/create.*$' => [
|
'^.*/organization/unit/create.*$' => [
|
||||||
[
|
|
||||||
'dest' => '\Modules\Media\Controller\BackendController::setUpFileUploaderTrait',
|
|
||||||
'verb' => RouteVerb::GET,
|
|
||||||
'permission' => [
|
|
||||||
'module' => BackendController::NAME,
|
|
||||||
'type' => PermissionType::CREATE,
|
|
||||||
'state' => PermissionCategory::UNIT,
|
|
||||||
],
|
|
||||||
],
|
|
||||||
[
|
[
|
||||||
'dest' => '\Modules\Organization\Controller\BackendController:viewUnitCreate',
|
'dest' => '\Modules\Organization\Controller\BackendController:viewUnitCreate',
|
||||||
'verb' => RouteVerb::GET,
|
'verb' => RouteVerb::GET,
|
||||||
|
|
|
||||||
|
|
@ -59,7 +59,7 @@ class Unit implements \JsonSerializable
|
||||||
* @var null|Unit
|
* @var null|Unit
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public ?self $parent;
|
public ?self $parent = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Description.
|
* Description.
|
||||||
|
|
|
||||||
|
|
@ -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