ParaTest\Parser\Parser::getMethods PHP Method

getMethods() private method

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