DOMDocument_schemaValidateSource_error1.phpt 895 B

1234567891011121314151617181920212223242526272829
  1. --TEST--
  2. DomDocument::schemaValidateSource() - string that is not a schema
  3. --CREDITS--
  4. Daniel Convissor <danielc@php.net>
  5. # TestFest 2009 NYPHP
  6. --SKIPIF--
  7. <?php require_once('skipif.inc'); ?>
  8. --FILE--
  9. <?php
  10. $doc = new DOMDocument;
  11. $doc->load(dirname(__FILE__)."/book.xml");
  12. $result = $doc->schemaValidateSource('string that is not a schema');
  13. var_dump($result);
  14. ?>
  15. --EXPECTF--
  16. Warning: DOMDocument::schemaValidateSource(): Entity: line 1: parser error : Start tag expected, '<' not found in %s.php on line %d
  17. Warning: DOMDocument::schemaValidateSource(): string that is not a schema in %s.php on line %d
  18. Warning: DOMDocument::schemaValidateSource(): ^ in %s.php on line %d
  19. Warning: DOMDocument::schemaValidateSource(): Failed to parse the XML resource 'in_memory_buffer'. in %s.php on line %d
  20. Warning: DOMDocument::schemaValidateSource(): Invalid Schema in %s.php on line %d
  21. bool(false)