class HashParserTest in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/css-selector/Tests/Parser/Shortcut/HashParserTest.php \Symfony\Component\CssSelector\Tests\Parser\Shortcut\HashParserTest
@author Jean-François Simon <jeanfrancois.simon@sensiolabs.com>
Hierarchy
- class \Symfony\Component\CssSelector\Tests\Parser\Shortcut\HashParserTest extends \Symfony\Component\CssSelector\Tests\Parser\Shortcut\PHPUnit_Framework_TestCase
Expanded class hierarchy of HashParserTest
File
- vendor/
symfony/ css-selector/ Tests/ Parser/ Shortcut/ HashParserTest.php, line 20
Namespace
Symfony\Component\CssSelector\Tests\Parser\ShortcutView source
class HashParserTest extends \PHPUnit_Framework_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]',
),
);
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
HashParserTest:: |
public | function | ||
HashParserTest:: |
public | function | @dataProvider getParseTestData |