DOMDocument_loadXML_error2.phpt 1001 B

123456789101112131415161718192021222324252627282930
  1. --TEST--
  2. Test DOMDocument::loadXML() detects not-well formed XML
  3. --DESCRIPTION--
  4. This test verifies the method detects attributes values not closed between " or '
  5. Environment variables used in the test:
  6. - XML_FILE: the xml file to load
  7. - LOAD_OPTIONS: the second parameter to pass to the method
  8. - EXPECTED_RESULT: the expected result
  9. --CREDITS--
  10. Antonio Diaz Ruiz <dejalatele@gmail.com>
  11. --INI--
  12. assert.bail=true
  13. --SKIPIF--
  14. <?php include('skipif.inc'); ?>
  15. --ENV--
  16. XML_FILE=/not_well_formed2.xml
  17. LOAD_OPTIONS=0
  18. EXPECTED_RESULT=0
  19. --FILE_EXTERNAL--
  20. domdocumentloadxml_test_method.php
  21. --EXPECTF--
  22. Warning: DOMDocument::load%r(XML){0,1}%r(): AttValue: " or ' expected %s
  23. Warning: DOMDocument::load%r(XML){0,1}%r(): attributes construct error %s
  24. Warning: DOMDocument::load%r(XML){0,1}%r(): Couldn't find end of Start Tag book %s
  25. Warning: DOMDocument::load%r(XML){0,1}%r(): Opening and ending tag mismatch: books %s
  26. Warning: DOMDocument::load%r(XML){0,1}%r(): Extra content at the end of the document %s