[ext/dom/tests/bug42082.phpt]

From: Date: Fri, 02 May 2008 15:19:48 +0000
Subject: [ext/dom/tests/bug42082.phpt]
Groups: php.qa 
Request: Send a blank email to php-qa+get-64269@lists.php.net to get a copy of this message
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

« previous php.qa (#64269) next »