Skip to content

Commit

Permalink
TestSuite - Don't complain about PSR-0 classes
Browse files Browse the repository at this point in the history
  • Loading branch information
totten authored and sebastianbergmann committed Aug 11, 2022
1 parent aaa98ac commit c1f34a7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Framework/TestSuite.php
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,8 @@ public function addTestFile(string $filename): void
$this->addTest($method->invoke(null, $className));
}
} elseif ($class->implementsInterface(Test::class)) {
$expectedClassName = $shortName;
$isPsr0 = (!$class->inNamespace()) && (strpos($class->getName(), '_') !== false);
$expectedClassName = $isPsr0 ? $className : $shortName;

if (($pos = strpos($expectedClassName, '.')) !== false) {
$expectedClassName = substr(
Expand Down

0 comments on commit c1f34a7

Please sign in to comment.