DOMDocument_loadXML_error4.phpt 723 B

1234567891011121314151617181920212223
  1. --TEST--
  2. Test DOMDocument::loadXML() detects not-well formed XML
  3. --DESCRIPTION--
  4. This test verifies the method detects an unsupported xml version
  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. <?php if (LIBXML_VERSION < 20701) die("skip: libxml2 2.7.1+ required"); ?>
  16. --ENV--
  17. XML_FILE=/not_well_formed4.xml
  18. LOAD_OPTIONS=0
  19. EXPECTED_RESULT=0
  20. --FILE_EXTERNAL--
  21. domdocumentloadxml_test_method.php
  22. --EXPECTF--
  23. Warning: DOMDocument::load%r(XML){0,1}%r(): Unsupported version '3.1' %s