mirror of
https://github.com/Karaka-Management/oms-Organization.git
synced 2026-01-11 16:18:40 +00:00
fix tests
This commit is contained in:
parent
d621f3faca
commit
2098eb832a
|
|
@ -52,15 +52,6 @@ return [
|
|||
],
|
||||
],
|
||||
'^.*/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',
|
||||
'verb' => RouteVerb::GET,
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ class Unit implements \JsonSerializable
|
|||
* @var null|Unit
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public ?self $parent;
|
||||
public ?self $parent = null;
|
||||
|
||||
/**
|
||||
* Description.
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user