src/Parser/Parser.php
/**
     * Parses content into a test suite.
     *
     * @since 1.0.0
     *
     * @param FilePathInterface     $filePath     The file path.
     * @param string[]              $content      The content.
     * @param ParseContextInterface $parseContext The parse context.
     *
     * @return ParseResultInterface The parse result.
     */
Parses content into a test suite.

@param FilePathInterface     $filePath     The file path.
@param string[]              $content      The content.
@param ParseContextInterface $parseContext The parse context.

@return ParseResultInterface The parse result.
Parses content into a test suite . @param FilePathInterface $filePath The file path . @param string [] $content The content . @param ParseContextInterface $parseContext The parse context . @return ParseResultInterface The parse result .
public function parse(FilePathInterface $filePath, array $content, ParseContextInterface $parseContext): ParseResultInterface
    {
        $testSuite = new TestSuite();
        $currentTestCase = null;
        $parseErrors = [];
        $lineNumber = 0;
        foreach ($content as $line) {
            $line = trim($line);
            $lineNumber++;
            $location = new FileLocation($filePath, $lineNumber);
            self::parseLine($location, $line, $parseContext, $testSuite, $currentTestCase, $parseErrors);
        }
        return new ParseResult($testSuite, $parseErrors);
    }
public function parse ( FilePathInterface $ filePath , array $ content , ParseContextInterface $ parseContext ) : ParseResultInterface { $ testSuite = new TestSuite ( ) ; $ currentTestCase = null ; $ parseErrors = [ ] ; $ lineNumber = 0 ; foreach ( $ content as $ line ) { $ line = trim ( $ line ) ; $ lineNumber ++ ; $ location = new FileLocation ( $ filePath , $ lineNumber ) ; self :: parseLine ( $ location , $ line , $ parseContext , $ testSuite , $ currentTestCase , $ parseErrors ) ; } return new ParseResult ( $ testSuite , $ parseErrors ) ; }
Parses content into a test suite.
Parses content into a test suite .