Annotation of embedaddon/php/ext/dom/tests/DOMDocument_preserveWhiteSpace_variations.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: DOMDocument::$preserveWhiteSpace - test ability to read and write property
! 3: --CREDITS--
! 4: Lev Radin <prokurator@gmail.com>
! 5: # TestFest 2009 NYPHP
! 6: --SKIPIF--
! 7: <?php require_once('skipif.inc'); ?>
! 8: --FILE--
! 9: <?php
! 10:
! 11: echo "Load document with preserveWhiteSpace on\n";
! 12: $doc = new DOMDocument;
! 13: $doc->load(dirname(__FILE__)."/book.xml");
! 14: echo $doc->saveXML();
! 15:
! 16:
! 17: echo "\nLoad document with preserveWhiteSpace off\n";
! 18: $doc = new DOMDocument;
! 19: $doc->preserveWhiteSpace = false;
! 20: $doc->load(dirname(__FILE__)."/book.xml");
! 21: echo $doc->saveXML();
! 22:
! 23: ?>
! 24: --EXPECT--
! 25: Load document with preserveWhiteSpace on
! 26: <?xml version="1.0"?>
! 27: <books>
! 28: <book>
! 29: <title>The Grapes of Wrath</title>
! 30: <author>John Steinbeck</author>
! 31: </book>
! 32: <book>
! 33: <title>The Pearl</title>
! 34: <author>John Steinbeck</author>
! 35: </book>
! 36: </books>
! 37:
! 38: Load document with preserveWhiteSpace off
! 39: <?xml version="1.0"?>
! 40: <books><book><title>The Grapes of Wrath</title><author>John Steinbeck</author></book><book><title>The Pearl</title><author>John Steinbeck</author></book></books>
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>