Created
April 28, 2010 18:57
-
-
Save hobodave/382547 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Index: tests/Zend/Dom/QueryTest.php | |
=================================================================== | |
--- tests/Zend/Dom/QueryTest.php (revision 22034) | |
+++ tests/Zend/Dom/QueryTest.php (working copy) | |
@@ -243,6 +243,32 @@ | |
$this->assertTrue(is_array($errors)); | |
$this->assertTrue(0 < count($errors)); | |
} | |
+ | |
+ /** | |
+ * @group ZF-9765 | |
+ */ | |
+ public function testCssSelectorShouldFindNodesWhenMatchingMultipleAttributes() | |
+ { | |
+ $html = <<<EOF | |
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" | |
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | |
+<html> | |
+<body> | |
+ <form action="#" method="get"> | |
+ <input type="hidden" name="foo" value="1" id="foo"/> | |
+ <input type="hidden" name="bar" value="0" id="bar"/> | |
+ <input type="hidden" name="baz" value="1" id="baz"/> | |
+ </form> | |
+</body> | |
+</html> | |
+EOF; | |
+ | |
+ $this->query->setDocument($html); | |
+ $results = $this->query->query('input[type="hidden"][value="1"]'); | |
+ $this->assertEquals(2, count($results)); | |
+ $results = $this->query->query('input[type="hidden"][value="0"]'); | |
+ $this->assertEquals(1, count($results)); | |
+ } | |
} | |
// Call Zend_Dom_QueryTest::main() if this source file is executed directly. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment