You are here

public function HashParserTest::testParse in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/css-selector/Tests/Parser/Shortcut/HashParserTest.php \Symfony\Component\CssSelector\Tests\Parser\Shortcut\HashParserTest::testParse()

@dataProvider getParseTestData

File

vendor/symfony/css-selector/Tests/Parser/Shortcut/HashParserTest.php, line 23

Class

HashParserTest
@author Jean-François Simon <jeanfrancois.simon@sensiolabs.com>

Namespace

Symfony\Component\CssSelector\Tests\Parser\Shortcut

Code

public function testParse($source, $representation) {
  $parser = new HashParser();
  $selectors = $parser
    ->parse($source);
  $this
    ->assertCount(1, $selectors);

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