dom004.phpt 526 B

12345678910111213141516171819202122232425
  1. --TEST--
  2. Test 4: Streams Test
  3. --SKIPIF--
  4. <?php
  5. require_once('skipif.inc');
  6. in_array('compress.zlib', stream_get_wrappers()) or die('skip compress.zlib wrapper is not available');
  7. ?>
  8. --FILE--
  9. <?php
  10. $dom = new domdocument;
  11. $dom->load("compress.zlib://".dirname(__FILE__)."/book.xml.gz");
  12. print $dom->saveXML();
  13. --EXPECT--
  14. <?xml version="1.0"?>
  15. <books>
  16. <book>
  17. <title>The Grapes of Wrath</title>
  18. <author>John Steinbeck</author>
  19. </book>
  20. <book>
  21. <title>The Pearl</title>
  22. <author>John Steinbeck</author>
  23. </book>
  24. </books>