Re: [ext/dom/tests/bug42082.phpt]
| From: | zoe | Date: | Sat, 03 May 2008 20:41:05 +0000 |
| Subject: | Re: [ext/dom/tests/bug42082.phpt] | ||
| References: | 1 | Groups: | php.qa |
| Request: | Send a blank email to php-qa+get-64278@lists.php.net to get a copy of this message | ||
e.stewart@mac.com wrote:
Eric - thanks. This is a good fix - I've committed in PHP52, 53 and 6. I've put your name in the commit comment.
Zoe
Reading the documentation, it appears to me that I should be emailing test changes and new tests to this list for review as I certainly don't have enough karma to commit at this point. I think I remember hearing there would be a form at some point for submitting these, but I've not seen that yet. Please let me know if this procedure is wrong in anyway as I will quickly correct it. File: [ext/dom/tests/bug42082.phpt] Problem: This test is to uncover a bug which appears to still be a bug as the test is failing as it should. But. There is a syntax error later on which will lead to another failure of this test after the bug in the PHP is actually fixed. Below is the fixed test contents: --TEST-- Bug #42082 (NodeList length zero should be empty) --FILE-- <?php $doc = new DOMDocument(); $xpath = new DOMXPath($doc); $nodes = $xpath->query('*'); var_dump($nodes); var_dump($nodes->length); $length = $nodes->length; var_dump(empty($nodes->length), empty($length)); $doc->loadXML("<element></element>"); var_dump($doc->firstChild->nodeValue, empty($doc->firstChild->nodeValue), isset($doc->firstChild->nodeValue)); var_dump(empty($doc->nodeType), empty($doc->firstChild->nodeType)) ?> --EXPECTF-- object(DOMNodeList)#%d (0) { } int(0) bool(true) bool(true) string(0) "" bool(true) bool(true) bool(false) bool(false) Eric Stewart e.stewart@mac.com