src/Parser/Parser.php
private function getMethods(): array
    {
        $tests = [];
        $methods = $this->refl->getMethods(\ReflectionMethod::IS_PUBLIC);
        foreach ($methods as $method) {
            $hasTestName = preg_match(self::$testName, $method->getName());
            $docComment = $method->getDocComment();
            $hasTestAnnotation = false !== $docComment && preg_match(self::$testAnnotation, $docComment);
            $isTestMethod = $hasTestName || $hasTestAnnotation;
            if ($isTestMethod) {
                $tests[] = new ParsedFunction((string) $method->getDocComment(), 'public', $method->getName());
            }
        }

        return $tests;
    }
private function getMethods(): array
    {
        $tests = [];
        $methods = $this->refl->getMethods(\ReflectionMethod::IS_PUBLIC);
        foreach ($methods as $method) {
            $hasTestName = preg_match(self::$testName, $method->getName());
            $docComment = $method->getDocComment();
            $hasTestAnnotation = false !== $docComment && preg_match(self::$testAnnotation, $docComment);
            $isTestMethod = $hasTestName || $hasTestAnnotation;
            if ($isTestMethod) {
                $tests[] = new ParsedFunction((string) $method->getDocComment(), 'public', $method->getName());
            }
        }

        return $tests;
    }
private function getMethods ( ) : array { $ tests = [ ] ; $ methods = $ this -> refl -> getMethods ( \ ReflectionMethod :: IS_PUBLIC ) ; foreach ( $ methods as $ method ) { $ hasTestName = preg_match ( self :: $ testName , $ method -> getName ( ) ) ; $ docComment = $ method -> getDocComment ( ) ; $ hasTestAnnotation = false !== $ docComment && preg_match ( self :: $ testAnnotation , $ docComment ) ; $ isTestMethod = $ hasTestName || $ hasTestAnnotation ; if ( $ isTestMethod ) { $ tests [ ] = new ParsedFunction ( ( string ) $ method -> getDocComment ( ) , 'public' , $ method -> getName ( ) ) ; } } return $ tests ; }
Return all test methods present in the file.

@return array
Return all test methods present in the file .