ant Mon Dec 1 11:29:35 2008 UTC Added files: (Branch: PHP_5_2) /php-src/ext/dom/tests DOMNode_issamenode_basic.phpt DOMText_appendData_basic.phpt DOMCharacterData_appendData_basic.phpt DOMNode_removeChild_basic.phpt DOMDocument_createAttribute_variation.phpt DOMComment_insertData_error2.phpt DOMDocument_loadHTML_basic.phpt DOMNode_normalize_basic.phpt DOMComment_replaceData_error2.phpt DOMComment_appendData_basic_Sullivan.phpt DOMComment_replaceData_basic.phpt DOMComment_appendData_basic.phpt DOMDocument_save_basic.phpt DOMDocument_createAttribute_basic.phpt DOMComment_replaceData_error1.phpt DOMNode_cloneNode_basic.phpt DOMNode_hasChildNodes_basic.phpt DOMNode_replaceChild_basic.phpt DOMDocument_createAttribute_error.phpt DOMComment_insertData_error1.phpt DOMDocument_createProcessingInstruction_basic.phpt DOMDocument_createAttribute_error1.phpt DOMDocumentFragment_appendXML_hasChildNodes_basic.phpt DOMComment_insertData_basic.phpt DOMDocument_createProcessingInstruction_error.phpt DOMElement_hasAttributes_basic.phpt Log: DOM tests: checked on PHP 5.2.6, 5.3 and 6.0 (Windows, Linux and Linux 64 bit).
http://cvs.php.net/viewvc.cgi/php-src/ext/dom/tests/DOMNode_issamenode_basic.phpt?view=markup&rev=1.1 Index: php-src/ext/dom/tests/DOMNode_issamenode_basic.phpt +++ php-src/ext/dom/tests/DOMNode_issamenode_basic.phpt
http://cvs.php.net/viewvc.cgi/php-src/ext/dom/tests/DOMText_appendData_basic.phpt?view=markup&rev=1.1 Index: php-src/ext/dom/tests/DOMText_appendData_basic.phpt +++ php-src/ext/dom/tests/DOMText_appendData_basic.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/dom/tests/DOMCharacterData_appendData_basic.phpt?view=markup&rev=1.1 Index: php-src/ext/dom/tests/DOMCharacterData_appendData_basic.phpt +++ php-src/ext/dom/tests/DOMCharacterData_appendData_basic.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/dom/tests/DOMNode_removeChild_basic.phpt?view=markup&rev=1.1 Index: php-src/ext/dom/tests/DOMNode_removeChild_basic.phpt +++ php-src/ext/dom/tests/DOMNode_removeChild_basic.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/dom/tests/DOMDocument_createAttribute_variation.phpt?view=markup&rev=1.1 Index: php-src/ext/dom/tests/DOMDocument_createAttribute_variation.phpt +++ php-src/ext/dom/tests/DOMDocument_createAttribute_variation.phpt --TEST-- Test DOMDocument::createAttribute() for expected return value --FILE-- <?php $dom = new DOMDocument(); $attr = $dom->createAttribute('string'); echo get_class($attr); ?> --EXPECTF-- DOMAttr http://cvs.php.net/viewvc.cgi/php-src/ext/dom/tests/DOMComment_insertData_error2.phpt?view=markup&rev=1.1 Index: php-src/ext/dom/tests/DOMComment_insertData_error2.phpt +++ php-src/ext/dom/tests/DOMComment_insertData_error2.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/dom/tests/DOMDocument_loadHTML_basic.phpt?view=markup&rev=1.1 Index: php-src/ext/dom/tests/DOMDocument_loadHTML_basic.phpt +++ php-src/ext/dom/tests/DOMDocument_loadHTML_basic.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/dom/tests/DOMNode_normalize_basic.phpt?view=markup&rev=1.1 Index: php-src/ext/dom/tests/DOMNode_normalize_basic.phpt +++ php-src/ext/dom/tests/DOMNode_normalize_basic.phpt --TEST-- DomNode::normalize() --SKIPIF-- <?php include('skipif.inc'); ?> --FILE-- <?php /* Create an XML document * with structure * <book> * <author></author> * <title>This is the title</title> * </book> * Calculate the number of title text nodes (1). * Add another text node to title. Calculate the number of title text nodes (2). * Normalize author. Calculate the number of title text nodes (2). * Normalize title. Calculate the number of title text nodes (1). */ $doc = new DOMDocument(); $root = $doc->createElement('book'); $doc->appendChild($root); $title = $doc->createElement('title'); $root->appendChild($title); $author = $doc->createElement('author'); $root->appendChild($author); $text = $doc->createTextNode('This is the first title'); $title->appendChild($text); echo "Number of child nodes of title = "; var_dump($title->childNodes->length); // add a second text node to title $text = $doc->createTextNode('This is the second title'); $title->appendChild($text); echo "Number of child nodes of title after adding second title = "; var_dump($title->childNodes->length); // should do nothing $author->normalize(); echo "Number of child nodes of title after normalizing author = "; var_dump($title->childNodes->length); // should concatenate first and second title text nodes $title->normalize(); echo "Number of child nodes of title after normalizing title = "; var_dump($title->childNodes->length); ?> --EXPECTF-- Number of child nodes of title = int(1) Number of child nodes of title after adding second title = int(2) Number of child nodes of title after normalizing author = int(2) Number of child nodes of title after normalizing title = int(1) http://cvs.php.net/viewvc.cgi/php-src/ext/dom/tests/DOMComment_replaceData_error2.phpt?view=markup&rev=1.1 Index: php-src/ext/dom/tests/DOMComment_replaceData_error2.phpt +++ php-src/ext/dom/tests/DOMComment_replaceData_error2.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/dom/tests/DOMComment_appendData_basic_Sullivan.phpt?view=markup&rev=1.1 Index: php-src/ext/dom/tests/DOMComment_appendData_basic_Sullivan.phpt +++ php-src/ext/dom/tests/DOMComment_appendData_basic_Sullivan.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/dom/tests/DOMComment_replaceData_basic.phpt?view=markup&rev=1.1 Index: php-src/ext/dom/tests/DOMComment_replaceData_basic.phpt +++ php-src/ext/dom/tests/DOMComment_replaceData_basic.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/dom/tests/DOMComment_appendData_basic.phpt?view=markup&rev=1.1 Index: php-src/ext/dom/tests/DOMComment_appendData_basic.phpt +++ php-src/ext/dom/tests/DOMComment_appendData_basic.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/dom/tests/DOMDocument_save_basic.phpt?view=markup&rev=1.1 Index: php-src/ext/dom/tests/DOMDocument_save_basic.phpt +++ php-src/ext/dom/tests/DOMDocument_save_basic.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/dom/tests/DOMDocument_createAttribute_basic.phpt?view=markup&rev=1.1 Index: php-src/ext/dom/tests/DOMDocument_createAttribute_basic.phpt +++ php-src/ext/dom/tests/DOMDocument_createAttribute_basic.phpt --TEST-- DomDocument::createAttribute() - basic test for DomDocument::createAttribute() --CREDITS-- Muhammad Khalid Adnan # TestFest 2008 --FILE-- <?php $doc = new DOMDocument; $node = $doc->createElement("para"); $newnode = $doc->appendChild($node); // A pass case. $test_attribute = $doc->createAttribute("hahaha"); $node->appendChild($test_attribute); echo $doc->saveXML(); ?> --EXPECT-- <?xml version="1.0"?> <para hahaha=""/> http://cvs.php.net/viewvc.cgi/php-src/ext/dom/tests/DOMComment_replaceData_error1.phpt?view=markup&rev=1.1 Index: php-src/ext/dom/tests/DOMComment_replaceData_error1.phpt +++ php-src/ext/dom/tests/DOMComment_replaceData_error1.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/dom/tests/DOMNode_cloneNode_basic.phpt?view=markup&rev=1.1 Index: php-src/ext/dom/tests/DOMNode_cloneNode_basic.phpt +++ php-src/ext/dom/tests/DOMNode_cloneNode_basic.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/dom/tests/DOMNode_hasChildNodes_basic.phpt?view=markup&rev=1.1 Index: php-src/ext/dom/tests/DOMNode_hasChildNodes_basic.phpt +++ php-src/ext/dom/tests/DOMNode_hasChildNodes_basic.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/dom/tests/DOMNode_replaceChild_basic.phpt?view=markup&rev=1.1 Index: php-src/ext/dom/tests/DOMNode_replaceChild_basic.phpt +++ php-src/ext/dom/tests/DOMNode_replaceChild_basic.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/dom/tests/DOMDocument_createAttribute_error.phpt?view=markup&rev=1.1 Index: php-src/ext/dom/tests/DOMDocument_createAttribute_error.phpt +++ php-src/ext/dom/tests/DOMDocument_createAttribute_error.phpt --TEST-- Test DOMDocument::createAttribute() for expected expection thrown when wrong parameter passed --FILE-- <?php $dom = new DOMDocument(); try { $attr = $dom->createAttribute(0); } catch(DOMException $e) { $code = $e->getCode(); if(DOM_INVALID_CHARACTER_ERR === $code) { echo "PASS"; } else { echo 'Wrong exception code'; } } catch(Exception $e) { echo 'Wrong exception thrown'; } ?> --EXPECTF-- PASS http://cvs.php.net/viewvc.cgi/php-src/ext/dom/tests/DOMComment_insertData_error1.phpt?view=markup&rev=1.1 Index: php-src/ext/dom/tests/DOMComment_insertData_error1.phpt +++ php-src/ext/dom/tests/DOMComment_insertData_error1.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/dom/tests/DOMDocument_createProcessingInstruction_basic.phpt?view=markup&rev=1.1 Index: php-src/ext/dom/tests/DOMDocument_createProcessingInstruction_basic.phpt +++ php-src/ext/dom/tests/DOMDocument_createProcessingInstruction_basic.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/dom/tests/DOMDocument_createAttribute_error1.phpt?view=markup&rev=1.1 Index: php-src/ext/dom/tests/DOMDocument_createAttribute_error1.phpt +++ php-src/ext/dom/tests/DOMDocument_createAttribute_error1.phpt --TEST-- DomDocument::createAttribute() - error test for DomDocument::createAttribute() --CREDITS-- Muhammad Khalid Adnan # TestFest 2008 --FILE-- <?php $doc = new DOMDocument; $node = $doc->createElement("para"); $newnode = $doc->appendChild($node); try { $failed_test_attribute = $doc->createAttribute("ha haha"); $node->appendChild($failed_test_attribute); echo $doc->saveXML(); } catch (DOMException $e) { echo 'Test failed!', PHP_EOL; } ?> --EXPECT-- Test failed! http://cvs.php.net/viewvc.cgi/php-src/ext/dom/tests/DOMDocumentFragment_appendXML_hasChildNodes_basic.phpt?view=markup&rev=1.1 Index: php-src/ext/dom/tests/DOMDocumentFragment_appendXML_hasChildNodes_basic.phpt +++ php-src/ext/dom/tests/DOMDocumentFragment_appendXML_hasChildNodes_basic.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/dom/tests/DOMComment_insertData_basic.phpt?view=markup&rev=1.1 Index: php-src/ext/dom/tests/DOMComment_insertData_basic.phpt +++ php-src/ext/dom/tests/DOMComment_insertData_basic.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/dom/tests/DOMDocument_createProcessingInstruction_error.phpt?view=markup&rev=1.1 Index: php-src/ext/dom/tests/DOMDocument_createProcessingInstruction_error.phpt +++ php-src/ext/dom/tests/DOMDocument_createProcessingInstruction_error.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/dom/tests/DOMElement_hasAttributes_basic.phpt?view=markup&rev=1.1 Index: php-src/ext/dom/tests/DOMElement_hasAttributes_basic.phpt +++ php-src/ext/dom/tests/DOMElement_hasAttributes_basic.phpt
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php