summaryrefslogtreecommitdiff
path: root/ext/dom/tests/domdocumentloadxml_test_method.inc
diff options
context:
space:
mode:
authorPeter Kokot <peterkokot@gmail.com>2018-09-21 20:06:47 +0200
committerPeter Kokot <peterkokot@gmail.com>2018-09-23 17:22:55 +0200
commitf116484cf1cd8a796f05c493ace4deca84bc8fdc (patch)
tree63e294cb82042cec6f183616b4d8c8f0e63b31b6 /ext/dom/tests/domdocumentloadxml_test_method.inc
parentf6605c788f0a73cf4f5f4ea32515b9ba7959e4ac (diff)
downloadphp-git-f116484cf1cd8a796f05c493ace4deca84bc8fdc.tar.gz
Rename *.php files in ext/dom tests to *.inc
*.php files are ignored by Git and a better practice might be to rename PHP included files for tests.
Diffstat (limited to 'ext/dom/tests/domdocumentloadxml_test_method.inc')
-rw-r--r--ext/dom/tests/domdocumentloadxml_test_method.inc12
1 files changed, 12 insertions, 0 deletions
diff --git a/ext/dom/tests/domdocumentloadxml_test_method.inc b/ext/dom/tests/domdocumentloadxml_test_method.inc
new file mode 100644
index 0000000000..66b02bf20b
--- /dev/null
+++ b/ext/dom/tests/domdocumentloadxml_test_method.inc
@@ -0,0 +1,12 @@
+<?php
+include(dirname(__FILE__) . '/domdocumentload_utilities.inc');
+
+$doc = new DOMDocument();
+
+$libxml_options = libxml_options_to_int(getenv('LOAD_OPTIONS'));
+$result = $doc->loadXML(file_get_contents(dirname(__FILE__) . getenv('XML_FILE')),
+ $libxml_options);
+
+$expectedResult = (bool) getenv('EXPECTED_RESULT');
+assert($result === $expectedResult);
+?>