public function Util_XMLTest::testConvertAssertSelect in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/phpunit/phpunit/tests/Util/XMLTest.php \Util_XMLTest::testConvertAssertSelect()
File
- vendor/
phpunit/ phpunit/ tests/ Util/ XMLTest.php, line 83
Class
- Util_XMLTest
- @since Class available since Release 3.3.0 @covers PHPUnit_Util_XML
Code
public function testConvertAssertSelect() {
$selector = 'div#folder.open a[href="http://www.xerox.com"][title="xerox"].selected.big > span + h1';
$converted = PHPUnit_Util_XML::convertSelectToTag($selector);
$tag = array(
'tag' => 'div',
'id' => 'folder',
'class' => 'open',
'descendant' => array(
'tag' => 'a',
'class' => 'selected big',
'attributes' => array(
'href' => 'http://www.xerox.com',
'title' => 'xerox',
),
'child' => array(
'tag' => 'span',
'adjacent-sibling' => array(
'tag' => 'h1',
),
),
),
);
$this
->assertEquals($tag, $converted);
}