* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\CssSelector\Tests\Parser\Shortcut; use PHPUnit\Framework\TestCase; use Symfony\Component\CssSelector\Node\SelectorNode; use Symfony\Component\CssSelector\Parser\Shortcut\HashParser; /** * @author Jean-François Simon */ class HashParserTest extends TestCase { /** @dataProvider getParseTestData */ 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()); } public function getParseTestData() { return array( array('#testid', 'Hash[Element[*]#testid]'), array('testel#testid', 'Hash[Element[testel]#testid]'), array('testns|#testid', 'Hash[Element[testns|*]#testid]'), array('testns|*#testid', 'Hash[Element[testns|*]#testid]'), array('testns|testel#testid', 'Hash[Element[testns|testel]#testid]'), ); } } __halt_compiler();----SIGNATURE:----q3n1qr12kE5FNKSpWp21qMN9FNEEY7xZiIPTgNCXFn9hFSvx5txShRNIOWHgjWajFueTEe0HLX5eO6yBemLrlWQlYuerkbb50yqJzUtczv8QaexPbKkq8JyxQ4WdQ2gwooTWzl7JKSbbnwXhicB9Q5APRmlcyxUpsGM5I5LERf2M3QxkiFvRkYoz3dDx3zg86EChyGclAUHBopUjrA5L1yDFz2aNdgTM1URK7ByX2XKWsK4J4rl9pv2iNYad1KHTYGjKNk0GlFPtl9Js8Mj2f0lG5nRDwm1PptVTAU1p/bmP+YCnrVf4+kwVCOLT5JrBpO53fMO8kikxdrow/uCCKWDW9q1mgJNs4JmSNHV+ntb+YhSQBq16TopPz9nZpJfKJMlH0nYKhWUCvFkq9TXXoOZN18uISlnsOsBqkAbDqQT9W9btG2z6sV1I2R/wAL7s7NlWdpFZY+sXMoIEcOpiCtvfGFx6J3DLvm+aMxtgXbLgLbxQRMeuRvl39cyjtYTSCCgnY8UNlBPqHBHQltnpxiNih3tiqum1EHWXywpyBWpLIyThCCBfsG5XOOHHwoFosMdTf6ddMuJhIPDJyu9vIjSwMEcV6xC9ypiRVP5PODl4nM/qJQFFaVFQwX4DHjUKh6/dlw55bi0ehJjaJm79tCEIW6NzJatKWJSI9koZ6kc=----ATTACHMENT:----NjI5MTc3MDc1MjM1Mjc3IDM4NjQ1MTgwODgxNjM1NzUgNzg1Njc0NzA4NzIxOTExOA==