From 1b3675760e1a6d3048b53eb092022a67951beaa4 Mon Sep 17 00:00:00 2001 From: Sebastian Bergmann Date: Mon, 29 Mar 2021 15:18:46 +0200 Subject: [PATCH] Micro optimization: skip non-public methods --- src/Framework/TestSuite.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Framework/TestSuite.php b/src/Framework/TestSuite.php index e5a13d0d7a2..a3045cbe4c1 100644 --- a/src/Framework/TestSuite.php +++ b/src/Framework/TestSuite.php @@ -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; }