You are here

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

@dataProvider getPseudoElementsTestData

File

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

Class

ParserTest

Namespace

Symfony\Component\CssSelector\Tests\Parser

Code

public function testPseudoElements($source, $element, $pseudo) {
  $parser = new Parser();
  $selectors = $parser
    ->parse($source);
  $this
    ->assertCount(1, $selectors);

  /** @var SelectorNode $selector */
  $selector = $selectors[0];
  $this
    ->assertEquals($element, (string) $selector
    ->getTree());
  $this
    ->assertEquals($pseudo, (string) $selector
    ->getPseudoElement());
}