From: Antonio Diaz Ruiz Date: Fri, 14 Jun 2013 21:11:08 +0000 (+0200) Subject: Adds files: error 1 to 5 and variation 1 to 4 X-Git-Tag: php-5.5.2~15 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=24f36934ad4b9d00a4c96da252497a4091bb28e6;p=php Adds files: error 1 to 5 and variation 1 to 4 tests for error1: not well formed xml tests for error2: not well formed xml attribute without colon tests for error2: not well formed xml, typo tests for error4: wrong xml version tests for error5: extra content at the end of the doc tests libxml_dtd_load tests libxml_dtd_valid tests for libdtd_noerror tests for LIBXML_DTDATTR, LIBXML_NOCDATA, LIBXML_NOENT and LIBXML_NOBLANKS the basic behavior fix comments --- diff --git a/ext/dom/tests/DOMDocument_loadXML_basic.phpt b/ext/dom/tests/DOMDocument_loadXML_basic.phpt new file mode 100644 index 0000000000..569593c007 --- /dev/null +++ b/ext/dom/tests/DOMDocument_loadXML_basic.phpt @@ -0,0 +1,21 @@ +--TEST-- +Test DOMDocument::loadXML() basic behavior +--DESCRIPTION-- +This test verifies the basic behaviour of the method +Environment variables used in the test: +- XML_FILE: the xml file to load +- LOAD_OPTIONS: the second parameter to pass to the method +- EXPECTED_RESULT: the expected result +--CREDITS-- +Antonio Diaz Ruiz +--INI-- +assert.bail=true +--SKIPIF-- + +--ENV-- +XML_FILE=/book.xml +LOAD_OPTIONS=0 +EXPECTED_RESULT=1 +--FILE_EXTERNAL-- +domdocumentloadxml_test_method.php +--EXPECT-- diff --git a/ext/dom/tests/DOMDocument_loadXML_error1.phpt b/ext/dom/tests/DOMDocument_loadXML_error1.phpt new file mode 100644 index 0000000000..52d44ea291 --- /dev/null +++ b/ext/dom/tests/DOMDocument_loadXML_error1.phpt @@ -0,0 +1,26 @@ +--TEST-- +Test DOMDocument::loadXML() detects not-well formed XML +--DESCRIPTION-- +This test verifies the method detects an opening and ending tag mismatch +Environment variables used in the test: +- XML_FILE: the xml file to load +- LOAD_OPTIONS: the second parameter to pass to the method +- EXPECTED_RESULT: the expected result +--CREDITS-- +Antonio Diaz Ruiz +--INI-- +assert.bail=true +--SKIPIF-- + +--ENV-- +XML_FILE=/not_well_formed.xml +LOAD_OPTIONS=0 +EXPECTED_RESULT=0 +--FILE_EXTERNAL-- +domdocumentloadxml_test_method.php +--EXPECTF-- +Warning: DOMDocument::load%r(XML){0,1}%r(): Opening and ending tag mismatch: title line 5 and book %s + +Warning: DOMDocument::load%r(XML){0,1}%r(): expected '>' %s + +Warning: DOMDocument::load%r(XML){0,1}%r(): Premature end of data in tag books %s diff --git a/ext/dom/tests/DOMDocument_loadXML_error2.phpt b/ext/dom/tests/DOMDocument_loadXML_error2.phpt new file mode 100644 index 0000000000..6ac4193daf --- /dev/null +++ b/ext/dom/tests/DOMDocument_loadXML_error2.phpt @@ -0,0 +1,30 @@ +--TEST-- +Test DOMDocument::loadXML() detects not-well formed XML +--DESCRIPTION-- +This test verifies the method detects attributes values not closed between " or ' +Environment variables used in the test: +- XML_FILE: the xml file to load +- LOAD_OPTIONS: the second parameter to pass to the method +- EXPECTED_RESULT: the expected result +--CREDITS-- +Antonio Diaz Ruiz +--INI-- +assert.bail=true +--SKIPIF-- + +--ENV-- +XML_FILE=/not_well_formed2.xml +LOAD_OPTIONS=0 +EXPECTED_RESULT=0 +--FILE_EXTERNAL-- +domdocumentloadxml_test_method.php +--EXPECTF-- +Warning: DOMDocument::load%r(XML){0,1}%r(): AttValue: " or ' expected %s + +Warning: DOMDocument::load%r(XML){0,1}%r(): attributes construct error %s + +Warning: DOMDocument::load%r(XML){0,1}%r(): Couldn't find end of Start Tag book %s + +Warning: DOMDocument::load%r(XML){0,1}%r(): Opening and ending tag mismatch: books %s + +Warning: DOMDocument::load%r(XML){0,1}%r(): Extra content at the end of the document %s diff --git a/ext/dom/tests/DOMDocument_loadXML_error3.phpt b/ext/dom/tests/DOMDocument_loadXML_error3.phpt new file mode 100644 index 0000000000..07f7ca7738 --- /dev/null +++ b/ext/dom/tests/DOMDocument_loadXML_error3.phpt @@ -0,0 +1,22 @@ +--TEST-- +Test DOMDocument::loadXML() detects not-well formed XML +--DESCRIPTION-- +This test verifies the method detects a typo in tag names +Environment variables used in the test: +- XML_FILE: the xml file to load +- LOAD_OPTIONS: the second parameter to pass to the method +- EXPECTED_RESULT: the expected result +--CREDITS-- +Antonio Diaz Ruiz +--INI-- +assert.bail=true +--SKIPIF-- + +--ENV-- +XML_FILE=/not_well_formed3.xml +LOAD_OPTIONS=0 +EXPECTED_RESULT=0 +--FILE_EXTERNAL-- +domdocumentloadxml_test_method.php +--EXPECTF-- +Warning: DOMDocument::load%r(XML){0,1}%r(): Opening and ending tag mismatch: boOk line 8 and book %s diff --git a/ext/dom/tests/DOMDocument_loadXML_error4.phpt b/ext/dom/tests/DOMDocument_loadXML_error4.phpt new file mode 100644 index 0000000000..e35d3dcea5 --- /dev/null +++ b/ext/dom/tests/DOMDocument_loadXML_error4.phpt @@ -0,0 +1,22 @@ +--TEST-- +Test DOMDocument::loadXML() detects not-well formed XML +--DESCRIPTION-- +This test verifies the method detects an unsupported xml version +Environment variables used in the test: +- XML_FILE: the xml file to load +- LOAD_OPTIONS: the second parameter to pass to the method +- EXPECTED_RESULT: the expected result +--CREDITS-- +Antonio Diaz Ruiz +--INI-- +assert.bail=true +--SKIPIF-- + +--ENV-- +XML_FILE=/not_well_formed4.xml +LOAD_OPTIONS=0 +EXPECTED_RESULT=0 +--FILE_EXTERNAL-- +domdocumentloadxml_test_method.php +--EXPECTF-- +Warning: DOMDocument::load%r(XML){0,1}%r(): Unsupported version '3.1' %s diff --git a/ext/dom/tests/DOMDocument_loadXML_error5.phpt b/ext/dom/tests/DOMDocument_loadXML_error5.phpt new file mode 100644 index 0000000000..a4aa1858f5 --- /dev/null +++ b/ext/dom/tests/DOMDocument_loadXML_error5.phpt @@ -0,0 +1,22 @@ +--TEST-- +Test DOMDocument::loadXML() detects not-well formed XML +--DESCRIPTION-- +This test verifies the method detects extra content at the end of the document +Environment variables used in the test: +- XML_FILE: the xml file to load +- LOAD_OPTIONS: the second parameter to pass to the method +- EXPECTED_RESULT: the expected result +--CREDITS-- +Antonio Diaz Ruiz +--INI-- +assert.bail=true +--SKIPIF-- + +--ENV-- +XML_FILE=/not_well_formed5.xml +LOAD_OPTIONS=0 +EXPECTED_RESULT=0 +--FILE_EXTERNAL-- +domdocumentloadxml_test_method.php +--EXPECTF-- +Warning: DOMDocument::load%r(XML){0,1}%r(): Extra content at the end of the document %s diff --git a/ext/dom/tests/DOMDocument_loadXML_variation1.phpt b/ext/dom/tests/DOMDocument_loadXML_variation1.phpt new file mode 100644 index 0000000000..eb5c693e42 --- /dev/null +++ b/ext/dom/tests/DOMDocument_loadXML_variation1.phpt @@ -0,0 +1,21 @@ +--TEST-- +Test DOMDocument::loadXML() with LIBXML_DTDLOAD option +--DESCRIPTION-- +This test verifies the right behaviour of the LIBXML_DTDLOAD constant +Environment variables used in the test: +- XML_FILE: the xml file to load +- LOAD_OPTIONS: the second parameter to pass to the method +- EXPECTED_RESULT: the expected result +--CREDITS-- +Antonio Diaz Ruiz +--INI-- +assert.bail=true +--SKIPIF-- + +--ENV-- +XML_FILE=/book_with_dtd.xml +LOAD_OPTIONS=LIBXML_DTDLOAD +EXPECTED_RESULT=1 +--FILE_EXTERNAL-- +domdocumentloadxml_test_method.php +--EXPECT-- diff --git a/ext/dom/tests/DOMDocument_loadXML_variation2.phpt b/ext/dom/tests/DOMDocument_loadXML_variation2.phpt new file mode 100644 index 0000000000..a1e6e80220 --- /dev/null +++ b/ext/dom/tests/DOMDocument_loadXML_variation2.phpt @@ -0,0 +1,22 @@ +--TEST-- +Test DOMDocument::loadXML() with LIBXML_DTDVALID option +--DESCRIPTION-- +This test verifies the right behaviour of the LIBXML_DTDVALID constant +Environment variables used in the test: +- XML_FILE: the xml file to load +- LOAD_OPTIONS: the second parameter to pass to the method +- EXPECTED_RESULT: the expected result +--CREDITS-- +Antonio Diaz Ruiz +--INI-- +assert.bail=true +--SKIPIF-- + +--ENV-- +XML_FILE=/wrong_book_with_dtd.xml +LOAD_OPTIONS=LIBXML_DTDVALID +EXPECTED_RESULT=1 +--FILE_EXTERNAL-- +domdocumentloadxml_test_method.php +--EXPECTF-- +Warning: DOMDocument::load%r(XML){0,1}%r(): Element book content does not follow the DTD, expecting (title , author), got (title author author ) %s diff --git a/ext/dom/tests/DOMDocument_loadXML_variation3.phpt b/ext/dom/tests/DOMDocument_loadXML_variation3.phpt new file mode 100644 index 0000000000..8e61ec4dbc --- /dev/null +++ b/ext/dom/tests/DOMDocument_loadXML_variation3.phpt @@ -0,0 +1,22 @@ +--TEST-- +Test DOMDocument::loadXML() with LIBXML_DTDVALID and LIBXML_NOERROR options +--DESCRIPTION-- +This test vrifies the right behaviour of the LIBXML_NOERROR constant +which avoids the display of the warning message +Environment variables used in the test: +- XML_FILE: the xml file to load +- LOAD_OPTIONS: the second parameter to pass to the method +- EXPECTED_RESULT: the expected result +--CREDITS-- +Antonio Diaz Ruiz +--INI-- +assert.bail=true +--SKIPIF-- + +--ENV-- +XML_FILE=/wrong_book_with_dtd.xml +LOAD_OPTIONS=LIBXML_DTDVALID | LIBXML_NOERROR +EXPECTED_RESULT=1 +--FILE_EXTERNAL-- +domdocumentloadxml_test_method.php +--EXPECT-- diff --git a/ext/dom/tests/DOMDocument_loadXML_variation4.phpt b/ext/dom/tests/DOMDocument_loadXML_variation4.phpt new file mode 100644 index 0000000000..6adefa8414 --- /dev/null +++ b/ext/dom/tests/DOMDocument_loadXML_variation4.phpt @@ -0,0 +1,25 @@ +--TEST-- +Test DOMDocument::loadXML() with LIBXML_DTDATTR, LIBXML_NOCDATA, LIBXML_NOENT, LIBXML_NOBLANKS +--DESCRIPTION-- +This test verifies the right behaviour of the following constants: +LIBXML_DTDATTR, LIBXML_NOCDATA, LIBXML_NOENT and LIBXML_NOBLANKS +Environment variables used in the test: +- XML_FILE: the xml file to load +- LOAD_OPTIONS: the second parameter to pass to the method +- EXPECTED_RESULT: the expected result +--CREDITS-- +Antonio Diaz Ruiz +--INI-- +assert.bail=true +--SKIPIF-- + +--ENV-- +XML_FILE=/book_with_dtd.xml +LOAD_OPTIONS=LIBXML_DTDATTR|LIBXML_NOCDATA|LIBXML_NOENT|LIBXML_NOBLANKS +EXPECTED_RESULT=1 +--FILE_EXTERNAL-- +domdocumentloadxml_test_method_savexml.php +--EXPECT-- + + +The Grapes of WrathJohn SteinbeckThe PearlJohn Steinbeckentity is only for test purposesdata for test diff --git a/ext/dom/tests/DOMDocument_load_basic.phpt b/ext/dom/tests/DOMDocument_load_basic.phpt new file mode 100644 index 0000000000..6d70ed4522 --- /dev/null +++ b/ext/dom/tests/DOMDocument_load_basic.phpt @@ -0,0 +1,21 @@ +--TEST-- +Test DOMDocument::load() basic behavior +--DESCRIPTION-- +This test verifies the basic behaviour of the method +Environment variables used in the test: +- XML_FILE: the xml file to load +- LOAD_OPTIONS: the second parameter to pass to the method +- EXPECTED_RESULT: the expected result +--CREDITS-- +Antonio Diaz Ruiz +--INI-- +assert.bail=true +--SKIPIF-- + +--ENV-- +XML_FILE=/book.xml +LOAD_OPTIONS=0 +EXPECTED_RESULT=1 +--FILE_EXTERNAL-- +domdocumentload_test_method.php +--EXPECT-- diff --git a/ext/dom/tests/DOMDocument_load_error1.phpt b/ext/dom/tests/DOMDocument_load_error1.phpt new file mode 100644 index 0000000000..2ac3f50979 --- /dev/null +++ b/ext/dom/tests/DOMDocument_load_error1.phpt @@ -0,0 +1,26 @@ +--TEST-- +Test DOMDocument::load() detects not-well formed XML +--DESCRIPTION-- +This test verifies the method detects an opening and ending tag mismatch +Environment variables used in the test: +- XML_FILE: the xml file to load +- LOAD_OPTIONS: the second parameter to pass to the method +- EXPECTED_RESULT: the expected result +--CREDITS-- +Antonio Diaz Ruiz +--INI-- +assert.bail=true +--SKIPIF-- + +--ENV-- +XML_FILE=/not_well_formed.xml +LOAD_OPTIONS=0 +EXPECTED_RESULT=0 +--FILE_EXTERNAL-- +domdocumentload_test_method.php +--EXPECTF-- +Warning: DOMDocument::load%r(XML){0,1}%r(): Opening and ending tag mismatch: title line 5 and book %s + +Warning: DOMDocument::load%r(XML){0,1}%r(): expected '>' %s + +Warning: DOMDocument::load%r(XML){0,1}%r(): Premature end of data in tag books %s diff --git a/ext/dom/tests/DOMDocument_load_error2.phpt b/ext/dom/tests/DOMDocument_load_error2.phpt new file mode 100644 index 0000000000..23a5e4827d --- /dev/null +++ b/ext/dom/tests/DOMDocument_load_error2.phpt @@ -0,0 +1,30 @@ +--TEST-- +Test DOMDocument::load() detects not-well formed XML +--DESCRIPTION-- +This test verifies the method detects attributes values not closed between " or ' +Environment variables used in the test: +- XML_FILE: the xml file to load +- LOAD_OPTIONS: the second parameter to pass to the method +- EXPECTED_RESULT: the expected result +--CREDITS-- +Antonio Diaz Ruiz +--INI-- +assert.bail=true +--SKIPIF-- + +--ENV-- +XML_FILE=/not_well_formed2.xml +LOAD_OPTIONS=0 +EXPECTED_RESULT=0 +--FILE_EXTERNAL-- +domdocumentload_test_method.php +--EXPECTF-- +Warning: DOMDocument::load%r(XML){0,1}%r(): AttValue: " or ' expected %s + +Warning: DOMDocument::load%r(XML){0,1}%r(): attributes construct error %s + +Warning: DOMDocument::load%r(XML){0,1}%r(): Couldn't find end of Start Tag book %s + +Warning: DOMDocument::load%r(XML){0,1}%r(): Opening and ending tag mismatch: books %s + +Warning: DOMDocument::load%r(XML){0,1}%r(): Extra content at the end of the document %s diff --git a/ext/dom/tests/DOMDocument_load_error3.phpt b/ext/dom/tests/DOMDocument_load_error3.phpt new file mode 100644 index 0000000000..b9ac49c466 --- /dev/null +++ b/ext/dom/tests/DOMDocument_load_error3.phpt @@ -0,0 +1,22 @@ +--TEST-- +Test DOMDocument::load() detects not-well formed XML +--DESCRIPTION-- +This test verifies the method detects and opening and ending tag mismatch +Environment variables used in the test: +- XML_FILE: the xml file to load +- LOAD_OPTIONS: the second parameter to pass to the method +- EXPECTED_RESULT: the expected result +--CREDITS-- +Antonio Diaz Ruiz +--INI-- +assert.bail=true +--SKIPIF-- + +--ENV-- +XML_FILE=/not_well_formed3.xml +LOAD_OPTIONS=0 +EXPECTED_RESULT=0 +--FILE_EXTERNAL-- +domdocumentload_test_method.php +--EXPECTF-- +Warning: DOMDocument::load%r(XML){0,1}%r(): Opening and ending tag mismatch: boOk line 8 and book %s diff --git a/ext/dom/tests/DOMDocument_load_error4.phpt b/ext/dom/tests/DOMDocument_load_error4.phpt new file mode 100644 index 0000000000..ca9ed79a3e --- /dev/null +++ b/ext/dom/tests/DOMDocument_load_error4.phpt @@ -0,0 +1,22 @@ +--TEST-- +Test DOMDocument::load() detects not-well formed XML +--DESCRIPTION-- +This test verifies the method detects an unsupported xml version +Environment variables used in the test: +- XML_FILE: the xml file to load +- LOAD_OPTIONS: the second parameter to pass to the method +- EXPECTED_RESULT: the expected result +--CREDITS-- +Antonio Diaz Ruiz +--INI-- +assert.bail=true +--SKIPIF-- + +--ENV-- +XML_FILE=/not_well_formed4.xml +LOAD_OPTIONS=0 +EXPECTED_RESULT=0 +--FILE_EXTERNAL-- +domdocumentload_test_method.php +--EXPECTF-- +Warning: DOMDocument::load%r(XML){0,1}%r(): Unsupported version '3.1' %s diff --git a/ext/dom/tests/DOMDocument_load_error5.phpt b/ext/dom/tests/DOMDocument_load_error5.phpt new file mode 100644 index 0000000000..a374f9474d --- /dev/null +++ b/ext/dom/tests/DOMDocument_load_error5.phpt @@ -0,0 +1,22 @@ +--TEST-- +Test DOMDocument::load() detects not-well formed XML +--DESCRIPTION-- +This test verifies the method detects extra content at the end of the document +Environment variables used in the test: +- XML_FILE: the xml file to load +- LOAD_OPTIONS: the second parameter to pass to the method +- EXPECTED_RESULT: the expected result +--CREDITS-- +Antonio Diaz Ruiz +--INI-- +assert.bail=true +--SKIPIF-- + +--ENV-- +XML_FILE=/not_well_formed5.xml +LOAD_OPTIONS=0 +EXPECTED_RESULT=0 +--FILE_EXTERNAL-- +domdocumentload_test_method.php +--EXPECTF-- +Warning: DOMDocument::load%r(XML){0,1}%r(): Extra content at the end of the document %s diff --git a/ext/dom/tests/DOMDocument_load_variation1.phpt b/ext/dom/tests/DOMDocument_load_variation1.phpt new file mode 100644 index 0000000000..b2b99e74c7 --- /dev/null +++ b/ext/dom/tests/DOMDocument_load_variation1.phpt @@ -0,0 +1,21 @@ +--TEST-- +Test DOMDocument::load() with LIBXML_DTDLOAD option +--DESCRIPTION-- +This test verifies the right behaviour of the LIBXML_DTDLOAD constant +Environment variables used in the test: +- XML_FILE: the xml file to load +- LOAD_OPTIONS: the second parameter to pass to the method +- EXPECTED_RESULT: the expected result +--CREDITS-- +Antonio Diaz Ruiz +--INI-- +assert.bail=true +--SKIPIF-- + +--ENV-- +XML_FILE=/book_with_dtd.xml +LOAD_OPTIONS=LIBXML_DTDLOAD +EXPECTED_RESULT=1 +--FILE_EXTERNAL-- +domdocumentload_test_method.php +--EXPECT-- diff --git a/ext/dom/tests/DOMDocument_load_variation2.phpt b/ext/dom/tests/DOMDocument_load_variation2.phpt new file mode 100644 index 0000000000..c8460e55eb --- /dev/null +++ b/ext/dom/tests/DOMDocument_load_variation2.phpt @@ -0,0 +1,22 @@ +--TEST-- +Test DOMDocument::load() with LIBXML_DTDVALID option +--DESCRIPTION-- +This test verifies the right behaviour of the LIBXML_DTDVALID constant +Environment variables used in the test: +- XML_FILE: the xml file to load +- LOAD_OPTIONS: the second parameter to pass to the method +- EXPECTED_RESULT: the expected result +--CREDITS-- +Antonio Diaz Ruiz +--INI-- +assert.bail=true +--SKIPIF-- + +--ENV-- +XML_FILE=/wrong_book_with_dtd.xml +LOAD_OPTIONS=LIBXML_DTDVALID +EXPECTED_RESULT=1 +--FILE_EXTERNAL-- +domdocumentload_test_method.php +--EXPECTF-- +Warning: DOMDocument::load%r(XML){0,1}%r(): Element book content does not follow the DTD, expecting (title , author), got (title author author ) %s diff --git a/ext/dom/tests/DOMDocument_load_variation3.phpt b/ext/dom/tests/DOMDocument_load_variation3.phpt new file mode 100644 index 0000000000..77801d475e --- /dev/null +++ b/ext/dom/tests/DOMDocument_load_variation3.phpt @@ -0,0 +1,22 @@ +--TEST-- +Test DOMDocument::load() with LIBXML_DTDVALID and LIBXML_NOERROR options +--DESCRIPTION-- +This test vrifies the right behaviour of the LIBXML_NOERROR constant +which avoids the display of the warning message +Environment variables used in the test: +- XML_FILE: the xml file to load +- LOAD_OPTIONS: the second parameter to pass to the method +- EXPECTED_RESULT: the expected result +--CREDITS-- +Antonio Diaz Ruiz +--INI-- +assert.bail=true +--SKIPIF-- + +--ENV-- +XML_FILE=/wrong_book_with_dtd.xml +LOAD_OPTIONS=LIBXML_DTDVALID | LIBXML_NOERROR +EXPECTED_RESULT=1 +--FILE_EXTERNAL-- +domdocumentload_test_method.php +--EXPECT-- diff --git a/ext/dom/tests/DOMDocument_load_variation4.phpt b/ext/dom/tests/DOMDocument_load_variation4.phpt new file mode 100644 index 0000000000..3bf7ccc04d --- /dev/null +++ b/ext/dom/tests/DOMDocument_load_variation4.phpt @@ -0,0 +1,25 @@ +--TEST-- +Test DOMDocument::load() with LIBXML_DTDATTR, LIBXML_NOCDATA, LIBXML_NOENT, LIBXML_NOBLANKS +--DESCRIPTION-- +This test verifies the right behaviour of the following constants: +LIBXML_DTDATTR, LIBXML_NOCDATA, LIBXML_NOENT and LIBXML_NOBLANKS +Environment variables used in the test: +- XML_FILE: the xml file to load +- LOAD_OPTIONS: the second parameter to pass to the method +- EXPECTED_RESULT: the expected result +--CREDITS-- +Antonio Diaz Ruiz +--INI-- +assert.bail=true +--SKIPIF-- + +--ENV-- +XML_FILE=/book_with_dtd.xml +LOAD_OPTIONS=LIBXML_DTDATTR|LIBXML_NOCDATA|LIBXML_NOENT|LIBXML_NOBLANKS +EXPECTED_RESULT=1 +--FILE_EXTERNAL-- +domdocumentload_test_method_savexml.php +--EXPECT-- + + +The Grapes of WrathJohn SteinbeckThe PearlJohn Steinbeckentity is only for test purposesdata for test diff --git a/ext/dom/tests/book_with_dtd.xml b/ext/dom/tests/book_with_dtd.xml new file mode 100644 index 0000000000..de12e92102 --- /dev/null +++ b/ext/dom/tests/book_with_dtd.xml @@ -0,0 +1,16 @@ + + + + + The Grapes of Wrath + John Steinbeck + + + The Pearl + John Steinbeck + + + &entitest; + + + diff --git a/ext/dom/tests/books.dtd b/ext/dom/tests/books.dtd new file mode 100644 index 0000000000..b3f03c1c16 --- /dev/null +++ b/ext/dom/tests/books.dtd @@ -0,0 +1,7 @@ + + + + + + diff --git a/ext/dom/tests/domdocumentload_test_method.php b/ext/dom/tests/domdocumentload_test_method.php new file mode 100644 index 0000000000..7afce15c3a --- /dev/null +++ b/ext/dom/tests/domdocumentload_test_method.php @@ -0,0 +1,12 @@ +load(dirname(__FILE__) . getenv('XML_FILE'), $libxml_options); + +$expectedResult = (bool) getenv('EXPECTED_RESULT'); +assert('$result === $expectedResult'); +?> diff --git a/ext/dom/tests/domdocumentload_test_method_savexml.php b/ext/dom/tests/domdocumentload_test_method_savexml.php new file mode 100644 index 0000000000..8ffd944524 --- /dev/null +++ b/ext/dom/tests/domdocumentload_test_method_savexml.php @@ -0,0 +1,14 @@ +load(dirname(__FILE__) . getenv('XML_FILE'), $libxml_options); + +$expectedResult = (bool) getenv('EXPECTED_RESULT'); +assert('$result === $expectedResult'); + +echo $doc->saveXML(); +?> diff --git a/ext/dom/tests/domdocumentload_utilities.php b/ext/dom/tests/domdocumentload_utilities.php new file mode 100644 index 0000000000..efd1e5a1a5 --- /dev/null +++ b/ext/dom/tests/domdocumentload_utilities.php @@ -0,0 +1,16 @@ + diff --git a/ext/dom/tests/domdocumentloadxml_test_method.php b/ext/dom/tests/domdocumentloadxml_test_method.php new file mode 100644 index 0000000000..7c4be85cf1 --- /dev/null +++ b/ext/dom/tests/domdocumentloadxml_test_method.php @@ -0,0 +1,12 @@ +loadXML(file_get_contents(dirname(__FILE__) . getenv('XML_FILE')), + $libxml_options); + +$expectedResult = (bool) getenv('EXPECTED_RESULT'); +assert('$result === $expectedResult'); +?> diff --git a/ext/dom/tests/domdocumentloadxml_test_method_savexml.php b/ext/dom/tests/domdocumentloadxml_test_method_savexml.php new file mode 100644 index 0000000000..550219fb78 --- /dev/null +++ b/ext/dom/tests/domdocumentloadxml_test_method_savexml.php @@ -0,0 +1,14 @@ +loadXML(file_get_contents(dirname(__FILE__) . getenv('XML_FILE')), + $libxml_options); + +$expectedResult = (bool) getenv('EXPECTED_RESULT'); +assert('$result === $expectedResult'); + +echo $doc->saveXML(); +?> diff --git a/ext/dom/tests/not_well_formed.xml b/ext/dom/tests/not_well_formed.xml new file mode 100644 index 0000000000..d362e0c4b9 --- /dev/null +++ b/ext/dom/tests/not_well_formed.xml @@ -0,0 +1,12 @@ + + + + + The Grapes of Wrath + <author>John Steinbeck</author> + </book> + <book> + <title>The Pearl + John Steinbeck + + diff --git a/ext/dom/tests/not_well_formed2.xml b/ext/dom/tests/not_well_formed2.xml new file mode 100644 index 0000000000..da6b3bccba --- /dev/null +++ b/ext/dom/tests/not_well_formed2.xml @@ -0,0 +1,12 @@ + + + + + The Grapes of Wrath + John Steinbeck + + + The Pearl + John Steinbeck + + diff --git a/ext/dom/tests/not_well_formed3.xml b/ext/dom/tests/not_well_formed3.xml new file mode 100644 index 0000000000..99b2189074 --- /dev/null +++ b/ext/dom/tests/not_well_formed3.xml @@ -0,0 +1,12 @@ + + + + + The Grapes of Wrath + John Steinbeck + + + The Pearl + John Steinbeck + + diff --git a/ext/dom/tests/not_well_formed4.xml b/ext/dom/tests/not_well_formed4.xml new file mode 100644 index 0000000000..581b8bd962 --- /dev/null +++ b/ext/dom/tests/not_well_formed4.xml @@ -0,0 +1,12 @@ + + + + + The Grapes of Wrath + John Steinbeck + + + The Pearl + John Steinbeck + + diff --git a/ext/dom/tests/not_well_formed5.xml b/ext/dom/tests/not_well_formed5.xml new file mode 100644 index 0000000000..f42ead83ab --- /dev/null +++ b/ext/dom/tests/not_well_formed5.xml @@ -0,0 +1,10 @@ + + + + The Grapes of Wrath + John Steinbeck + + + The Pearl + John Steinbeck + diff --git a/ext/dom/tests/wrong_book_with_dtd.xml b/ext/dom/tests/wrong_book_with_dtd.xml new file mode 100644 index 0000000000..3a2d48e355 --- /dev/null +++ b/ext/dom/tests/wrong_book_with_dtd.xml @@ -0,0 +1,13 @@ + + + + + The Grapes of Wrath + John Steinbeck + John Steinbeck + + + The Pearl + John Steinbeck + +