* * 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:----ubb9+YZwdp38ZpzRENT06Buaz/C7dYIXuFt5QZJSNKCBU5rHAgQcqgwcPhcF9kB5+VeAGCcMrgK7YTpXwfxeLa7rUHAUnlzVK5b5uOJnkmsXqv+/L1lOjCw6cA41yWcKDehoKiMzl8Yz6GY/KKzbGXHeCR6f2AJaS22NXp2h8sdFvhN8Y4doXZvjXkLMwyxg6GFHXlQbtah8gLzowx7VkACJ047q9J1JooNRAylDevDjYNHBTJLlzKUl1M7M9VcCwSFAFOYZnGgR48PpCbspeq5ULVw5p6kKuMc48Z4h5AqcjDfzfz56qBKXEiPyAhujj/Aqvtov9CHsnwWyKtOysAr8ED1IQOhmMKS9KJ8EfzuUctThB4jBsE4bphE+zW7M985WR37uwE+CWz5DlBHfs+rAvN4VHMZITYlIY2WsVuzjtjt3rfEfowQ3DuPa/lR0zwMuuDibuSurGj/WbUcf7IjDiZ1IfezpsRpk4b2TehDETDAQwTDauDG/jtWVsYw8AXhy0IvDmZhawWBsCqGD5LYBWqD79gd9HCiHB4jYBnw7GGLxLQgEDTdKq21XNvxkXXO5pz+gWaI3drZFqv7y3BPM2goTGMwXRkAKKnuprDuamSXPnwk4wC5n2YZyxlCW5pH7E6Lw9WO+i9xlLAzQNE/MmYHggcrVDsxDirXfYY0=----ATTACHMENT:----ODY1MTQ0MDUzNzMwNjYwOSAxOTczNDU2MDAyODAzMzM1IDM0ODgzMTM4Mjk3MTYwNzU=