OSDN Git Service

Добавлена возможность создавать новую запись предмета оборудования на основании уже...
[invent/invent.git] / vendor / phpunit / phpunit / src / Util / Test.php
index 9b15e50..bc5d190 100644 (file)
@@ -153,7 +153,7 @@ final class Test
      */
     public static function getMissingRequirements(string $className, string $methodName): array
     {
-        $required = static::getRequirements($className, $methodName);
+        $required = self::getRequirements($className, $methodName);
         $missing  = [];
         $hint     = null;
 
@@ -519,6 +519,10 @@ final class Test
 
     public static function isTestMethod(\ReflectionMethod $method): bool
     {
+        if (!$method->isPublic()) {
+            return false;
+        }
+
         if (\strpos($method->getName(), 'test') === 0) {
             return true;
         }
@@ -693,9 +697,9 @@ final class Test
                     }
 
                     foreach ($methods as $method) {
-                        if ($inverse && !$method->$visibility()) {
+                        if ($inverse && !$method->{$visibility}()) {
                             $codeToCoverList[] = $method;
-                        } elseif (!$inverse && $method->$visibility()) {
+                        } elseif (!$inverse && $method->{$visibility}()) {
                             $codeToCoverList[] = $method;
                         }
                     }