/** @dataProvider getParseSeriesTestData */
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([$a,
$b], Parser::
parseSeries($function->
getArguments()));
} /** @dataProvider getParseSeriesExceptionTestData */
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();