Annotation of embedaddon/php/ext/dom/tests/DOMDocument_documentURI_basic.phpt, revision 1.1

1.1     ! misho       1: --TEST--
        !             2: Tests DOMDocument::documentURI read and write
        !             3: --CREDITS--
        !             4: Chris Snyder <chsnyder@gmail.com>
        !             5: # TestFest 2009 NYPHP
        !             6: --SKIPIF--
        !             7: <?php require_once('skipif.inc'); ?>
        !             8: --FILE--
        !             9: <?php
        !            10: // create dom document
        !            11: $dom = new DOMDocument;
        !            12: $xml = '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
        !            13: <!DOCTYPE s1 PUBLIC "http://www.ibm.com/example.dtd" "example.dtd">
        !            14: <s1>foo</s1>';
        !            15: $dom->loadXML($xml);
        !            16: if(!$dom) {
        !            17:   echo "Error while parsing the document\n";
        !            18:   exit;
        !            19: }
        !            20: echo "DOMDocument created\n";
        !            21: 
        !            22: $test = $dom->documentURI;
        !            23: echo "Read initial documentURI:\n";
        !            24: echo $test."\n";
        !            25: 
        !            26: $dom->documentURI = 'http://dom.example.org/example.xml';
        !            27: $test = $dom->documentURI;
        !            28: echo "Set documentURI to a URL, reading again:\n";
        !            29: var_dump( $test );
        !            30: 
        !            31: echo "Done\n";
        !            32: ?>
        !            33: --EXPECTF--
        !            34: DOMDocument created
        !            35: Read initial documentURI:
        !            36: %s
        !            37: Set documentURI to a URL, reading again:
        !            38: string(34) "http://dom.example.org/example.xml"
        !            39: Done

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>