You are here

public function ParserTest::testParseSeries 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::testParseSeries()

@dataProvider getParseSeriesTestData

File

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

Class

ParserTest

Namespace

Symfony\Component\CssSelector\Tests\Parser

Code

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

  /** @var FunctionNode $function */
  $function = $selectors[0]
    ->getTree();
  $this
    ->assertEquals(array(
    $a,
    $b,
  ), Parser::parseSeries($function
    ->getArguments()));
}