You are here

public function ParserTest::testParseSeriesException in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/css-selector/Tests/Parser/ParserTest.php \Symfony\Component\CssSelector\Tests\Parser\ParserTest::testParseSeriesException()

@dataProvider getParseSeriesExceptionTestData

File

vendor/symfony/css-selector/Tests/Parser/ParserTest.php, line 83

Class

ParserTest

Namespace

Symfony\Component\CssSelector\Tests\Parser

Code

public function testParseSeriesException($series) {
  $parser = new Parser();
  $selectors = $parser
    ->parse(sprintf(':nth-child(%s)', $series));
  $this
    ->assertCount(1, $selectors);

  /** @var FunctionNode $function */
  $function = $selectors[0]
    ->getTree();
  $this
    ->setExpectedException('Symfony\\Component\\CssSelector\\Exception\\SyntaxErrorException');
  Parser::parseSeries($function
    ->getArguments());
}