You are here

public function ParserTest::testSpecificity in Zircon Profile 8.0

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

@dataProvider getSpecificityTestData

File

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

Class

ParserTest

Namespace

Symfony\Component\CssSelector\Tests\Parser

Code

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());
}