/** @dataProvider getSpecificityTestData */
public function testSpecificity($source,
$value) { $parser =
new Parser();
$selectors =
$parser->
parse($source);
$this->
assertCount(1,
$selectors);
/** @var SelectorNode $selector */
$selector =
$selectors[0
];
$this->
assertEquals($value,
$selector->
getSpecificity()->
getValue());
} /** @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();