Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Dennis Eichhorn committed Sep 27, 2023
1 parent 78ce2be commit 61b797a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/Autoloader.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,12 @@ public static function defaultAutoloader(string $class) : void
}

$class2 = $class;
$class3 = $class;

$pos = \stripos($class, '/');
if ($pos !== false) {
$class3 = \substr($class, $pos + 1);

$pos = \stripos($class, '/', $pos + 1);

if ($pos !== false) {
Expand All @@ -94,7 +97,7 @@ public static function defaultAutoloader(string $class) : void
}

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;
Expand Down

0 comments on commit 61b797a

Please sign in to comment.