Annotation of embedaddon/php/ext/xmlreader/tests/005.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: XMLReader: libxml2 XML Reader, parser property set/get
! 3: --SKIPIF--
! 4: <?php if (!extension_loaded("xmlreader")) print "skip"; ?>
! 5: --FILE--
! 6: <?php
! 7: /* $Id: 005.phpt 203342 2005-12-21 03:58:59Z pajoye $ */
! 8:
! 9: $xmlstring = '<?xml version="1.0" encoding="UTF-8"?>
! 10: <books></books>';
! 11:
! 12: $reader = new XMLReader();
! 13:
! 14: $reader->XML($xmlstring);
! 15:
! 16:
! 17: $a = $reader->setParserProperty(XMLReader::LOADDTD, false);
! 18: $b = $reader->getParserProperty(XMLReader::LOADDTD);
! 19:
! 20: if (!$a && !$b) {
! 21: echo "ok\n";
! 22: }
! 23:
! 24: $a = $reader->setParserProperty(XMLReader::SUBST_ENTITIES, true);
! 25: $b = $reader->getParserProperty(XMLReader::SUBST_ENTITIES);
! 26:
! 27: if ($a && $b) {
! 28: echo "ok\n";
! 29: }
! 30: // Only go through
! 31: while ($reader->read());
! 32: $reader->close();
! 33: ?>
! 34: ===DONE===
! 35: --EXPECT--
! 36: ok
! 37: ===DONE===
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>