Skip to content

Commit

Permalink
Micro optimization: skip non-public methods
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianbergmann committed Mar 29, 2021
1 parent ba87826 commit 1b36757
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Framework/TestSuite.php
Expand Up @@ -178,7 +178,7 @@ public function __construct($theClass = '', string $name = '')
return;
}

foreach ($theClass->getMethods() as $method) {
foreach ($theClass->getMethods(ReflectionMethod::IS_PUBLIC) as $method) {
if ($method->getDeclaringClass()->getName() === Assert::class) {
continue;
}
Expand Down

0 comments on commit 1b36757

Please sign in to comment.