ericstewart Mon May 25 06:07:39 2009 UTC Modified files: /php-src/ext/dom/tests DOMCharacterData_appendData_error_001.phpt DOMCharacterData_deleteData_basic_001.phpt DOMCharacterData_deleteData_error_001.phpt DOMCharacterData_deleteData_error_002.phpt DOMCharacterData_insertData_error_001.phpt DOMCharacterData_replaceData_error_001.phpt DOMComment_construct_error_001.phpt DOMDocumentFragment_appendXML_basic_001.phpt DOMDocumentFragment_appendXML_error_001.phpt DOMDocumentFragment_construct_basic_001.phpt DOMDocumentFragment_construct_error_001.phpt Log: Add the following new tests: DOMCharacterData::appendData() with no arguments. DOMCharacterData::deleteData() with count exceeding string size. DOMCharacterData::deleteData() with no arguments. DOMCharacterData::deleteData() with offset exceeding string size. DOMCharacterData::insertData() with no arguments. DOMCharacterData::replaceData() with no arguments. DOMComment::__construct() with more arguments than acceptable. DOMDocumentFragment::__construct(). DOMDocumentFragment::__construct() with too many errors. DOMDocumentFragment::appendXML() with no arguments. DOMDocumentFragment::appendXML() with children with properties.
http://cvs.php.net/viewvc.cgi/php-src/ext/dom/tests/DOMCharacterData_appendData_error_001.phpt?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/dom/tests/DOMCharacterData_appendData_error_001.phpt diff -u /dev/null php-src/ext/dom/tests/DOMCharacterData_appendData_error_001.phpt:1.2 --- /dev/null Mon May 25 06:07:39 2009 +++ php-src/ext/dom/tests/DOMCharacterData_appendData_error_001.phpt Mon May 25 06:07:39 2009 @@ -0,0 +1,19 @@ +--TEST-- +DOMCharacterData::appendData() with no arguments. +--CREDITS-- +Eric Stewart <ericleestew...@gmail.com> +# TestFest Atlanta 2009-05-24 +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$document = new DOMDocument; +$root = $document->createElement('root'); +$document->appendChild($root); + +$cdata = $document->createCDATASection('test'); +$root->appendChild($cdata); +$cdata->appendData(); +?> +--EXPECTF-- +Warning: DOMCharacterData::appendData() expects exactly 1 parameter, 0 given in %s on line %d \ No newline at end of file http://cvs.php.net/viewvc.cgi/php-src/ext/dom/tests/DOMCharacterData_deleteData_basic_001.phpt?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/dom/tests/DOMCharacterData_deleteData_basic_001.phpt diff -u /dev/null php-src/ext/dom/tests/DOMCharacterData_deleteData_basic_001.phpt:1.2 --- /dev/null Mon May 25 06:07:39 2009 +++ php-src/ext/dom/tests/DOMCharacterData_deleteData_basic_001.phpt Mon May 25 06:07:39 2009 @@ -0,0 +1,20 @@ +--TEST-- +DOMCharacterData::deleteData() with count exceeding string size. +--CREDITS-- +Eric Lee Stewart <ericleestew...@gmail.com> +# TestFest Atlanta 2009-05-24 +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$document = new DOMDocument; +$root = $document->createElement('root'); +$document->appendChild($root); + +$cdata = $document->createCDATASection('test'); +$root->appendChild($cdata); +$cdata->deleteData(1, 10); +var_dump($cdata->data); +?> +--EXPECTF-- +%unicode|string%(%d) "t" \ No newline at end of file http://cvs.php.net/viewvc.cgi/php-src/ext/dom/tests/DOMCharacterData_deleteData_error_001.phpt?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/dom/tests/DOMCharacterData_deleteData_error_001.phpt diff -u /dev/null php-src/ext/dom/tests/DOMCharacterData_deleteData_error_001.phpt:1.2 --- /dev/null Mon May 25 06:07:39 2009 +++ php-src/ext/dom/tests/DOMCharacterData_deleteData_error_001.phpt Mon May 25 06:07:39 2009 @@ -0,0 +1,19 @@ +--TEST-- +DOMCharacterData::deleteData() with no arguments. +--CREDITS-- +Eric Lee Stewart <ericleestew...@gmail.com> +# TestFest Atlanta 2009-05-24 +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$document = new DOMDocument; +$root = $document->createElement('root'); +$document->appendChild($root); + +$cdata = $document->createCDATASection('test'); +$root->appendChild($cdata); +$cdata->deleteData(); +?> +--EXPECTF-- +Warning: DOMCharacterData::deleteData() expects exactly 2 parameters, 0 given in %s on line %d \ No newline at end of file http://cvs.php.net/viewvc.cgi/php-src/ext/dom/tests/DOMCharacterData_deleteData_error_002.phpt?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/dom/tests/DOMCharacterData_deleteData_error_002.phpt diff -u /dev/null php-src/ext/dom/tests/DOMCharacterData_deleteData_error_002.phpt:1.2 --- /dev/null Mon May 25 06:07:39 2009 +++ php-src/ext/dom/tests/DOMCharacterData_deleteData_error_002.phpt Mon May 25 06:07:39 2009 @@ -0,0 +1,23 @@ +--TEST-- +DOMCharacterData::deleteData() with offset exceeding string size. +--CREDITS-- +Eric Lee Stewart <ericleestew...@gmail.com> +# TestFest Atlanta 2009-05-24 +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$document = new DOMDocument; +$root = $document->createElement('root'); +$document->appendChild($root); + +$cdata = $document->createCDATASection('test'); +$root->appendChild($cdata); +$cdata->deleteData(5, 1); +?> +--EXPECTF-- +Fatal error: Uncaught exception 'DOMException' with message 'Index Size Error' in %s:%d +Stack trace: +#0 %s(%d): DOMCharacterData->deleteData(5, 1) +#1 {main} + thrown in %s on line %d \ No newline at end of file http://cvs.php.net/viewvc.cgi/php-src/ext/dom/tests/DOMCharacterData_insertData_error_001.phpt?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/dom/tests/DOMCharacterData_insertData_error_001.phpt diff -u /dev/null php-src/ext/dom/tests/DOMCharacterData_insertData_error_001.phpt:1.2 --- /dev/null Mon May 25 06:07:39 2009 +++ php-src/ext/dom/tests/DOMCharacterData_insertData_error_001.phpt Mon May 25 06:07:39 2009 @@ -0,0 +1,19 @@ +--TEST-- +DOMCharacterData::insertData() with no arguments. +--CREDITS-- +Eric Lee Stewart <ericleestew...@gmail.com> +# TestFest Atlanta 2009-05-24 +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$document = new DOMDocument; +$root = $document->createElement('root'); +$document->appendChild($root); + +$cdata = $document->createCDATASection('test'); +$root->appendChild($cdata); +$cdata->insertData(); +?> +--EXPECTF-- +Warning: DOMCharacterData::insertData() expects exactly 2 parameters, 0 given in %s on line %d \ No newline at end of file http://cvs.php.net/viewvc.cgi/php-src/ext/dom/tests/DOMCharacterData_replaceData_error_001.phpt?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/dom/tests/DOMCharacterData_replaceData_error_001.phpt diff -u /dev/null php-src/ext/dom/tests/DOMCharacterData_replaceData_error_001.phpt:1.2 --- /dev/null Mon May 25 06:07:39 2009 +++ php-src/ext/dom/tests/DOMCharacterData_replaceData_error_001.phpt Mon May 25 06:07:39 2009 @@ -0,0 +1,19 @@ +--TEST-- +DOMCharacterData::replaceData() with no arguments. +--CREDITS-- +Eric Lee Stewart <ericleestew...@gmail.com> +# TestFest Atlanta 2009-05-24 +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$document = new DOMDocument; +$root = $document->createElement('root'); +$document->appendChild($root); + +$cdata = $document->createCDATASection('test'); +$root->appendChild($cdata); +$cdata->replaceData(); +?> +--EXPECTF-- +Warning: DOMCharacterData::replaceData() expects exactly 3 parameters, 0 given in %s on line %d \ No newline at end of file http://cvs.php.net/viewvc.cgi/php-src/ext/dom/tests/DOMComment_construct_error_001.phpt?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/dom/tests/DOMComment_construct_error_001.phpt diff -u /dev/null php-src/ext/dom/tests/DOMComment_construct_error_001.phpt:1.2 --- /dev/null Mon May 25 06:07:39 2009 +++ php-src/ext/dom/tests/DOMComment_construct_error_001.phpt Mon May 25 06:07:39 2009 @@ -0,0 +1,17 @@ +--TEST-- +DOMComment::__construct() with more arguments than acceptable. +--CREDITS-- +Eric Lee Stewart <ericleestew...@gmail.com> +# TestFest Atlanta 2009-05-24 +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$comment = new DOMComment("comment1", "comment2"); +?> +--EXPECTF-- +Fatal error: Uncaught exception 'DOMException' with message 'DOMComment::__construct() expects at most 1 parameter, 2 given' in %s:%d +Stack trace: +#0 %s(%d): DOMComment->__construct('comment1', 'comment2') +#1 {main} + thrown in %s on line %d \ No newline at end of file http://cvs.php.net/viewvc.cgi/php-src/ext/dom/tests/DOMDocumentFragment_appendXML_basic_001.phpt?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/dom/tests/DOMDocumentFragment_appendXML_basic_001.phpt diff -u /dev/null php-src/ext/dom/tests/DOMDocumentFragment_appendXML_basic_001.phpt:1.2 --- /dev/null Mon May 25 06:07:39 2009 +++ php-src/ext/dom/tests/DOMDocumentFragment_appendXML_basic_001.phpt Mon May 25 06:07:39 2009 @@ -0,0 +1,22 @@ +--TEST-- +DOMDocumentFragment::appendXML() with children with properties. +--CREDITS-- +Eric Lee Stewart <ericleestew...@gmail.com> +# TestFest Atlanta 2009-05-24 +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$document = new DOMDocument; +$root = $document->createElement('root'); +$document->appendChild($root); + +$fragment = $document->createDocumentFragment(); +$fragment->appendXML('<foo id="baz">bar</foo>'); +$root->appendChild($fragment); + +print $document->saveXML(); +?> +--EXPECT-- +<?xml version="1.0"?> +<root><foo id="baz">bar</foo></root> http://cvs.php.net/viewvc.cgi/php-src/ext/dom/tests/DOMDocumentFragment_appendXML_error_001.phpt?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/dom/tests/DOMDocumentFragment_appendXML_error_001.phpt diff -u /dev/null php-src/ext/dom/tests/DOMDocumentFragment_appendXML_error_001.phpt:1.2 --- /dev/null Mon May 25 06:07:39 2009 +++ php-src/ext/dom/tests/DOMDocumentFragment_appendXML_error_001.phpt Mon May 25 06:07:39 2009 @@ -0,0 +1,14 @@ +--TEST-- +DOMDocumentFragment::appendXML() with no arguments. +--CREDITS-- +Eric Lee Stewart <ericleestew...@gmail.com> +# TestFest Atlanta 2009-05-24 +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$fragment = new DOMDocumentFragment(); +$fragment->appendXML(); +?> +--EXPECTF-- +Warning: DOMDocumentFragment::appendXML() expects exactly 1 parameter, 0 given in %s on line %d \ No newline at end of file http://cvs.php.net/viewvc.cgi/php-src/ext/dom/tests/DOMDocumentFragment_construct_basic_001.phpt?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/dom/tests/DOMDocumentFragment_construct_basic_001.phpt diff -u /dev/null php-src/ext/dom/tests/DOMDocumentFragment_construct_basic_001.phpt:1.2 --- /dev/null Mon May 25 06:07:39 2009 +++ php-src/ext/dom/tests/DOMDocumentFragment_construct_basic_001.phpt Mon May 25 06:07:39 2009 @@ -0,0 +1,15 @@ +--TEST-- +DOMDocumentFragment::__construct(). +--CREDITS-- +Eric Lee Stewart <ericleestew...@gmail.com> +# TestFest Atlanta 2009-05-24 +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$fragment = new DOMDocumentFragment(); +var_dump($fragment); +?> +--EXPECTF-- +object(DOMDocumentFragment)#%d (%d) { +} http://cvs.php.net/viewvc.cgi/php-src/ext/dom/tests/DOMDocumentFragment_construct_error_001.phpt?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/dom/tests/DOMDocumentFragment_construct_error_001.phpt diff -u /dev/null php-src/ext/dom/tests/DOMDocumentFragment_construct_error_001.phpt:1.2 --- /dev/null Mon May 25 06:07:39 2009 +++ php-src/ext/dom/tests/DOMDocumentFragment_construct_error_001.phpt Mon May 25 06:07:39 2009 @@ -0,0 +1,17 @@ +--TEST-- +DOMDocumentFragment::__construct() with too many errors. +--CREDITS-- +Eric Lee Stewart <ericleestew...@gmail.com> +# TestFest Atlanta 2009-05-24 +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$fragment = new DOMDocumentFragment("root"); +?> +--EXPECTF-- +Fatal error: Uncaught exception 'DOMException' with message 'DOMDocumentFragment::__construct() expects exactly 0 parameters, 1 given' in %s:%d +Stack trace: +#0 %s(%d): DOMDocumentFragment->__construct('root') +#1 {main} + thrown in %s on line %d \ No newline at end of file
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php