--TEST-- Tests DOMDocument::resoleExternals get and set --CREDITS-- Chris Snyder # TestFest 2009 NYPHP --SKIPIF-- --FILE--

"Foo"

'; $dom->loadXML($xml); if(!$dom) { echo "Error while parsing the document\n"; exit; } echo "DOMDocument with external entities created\n"; $test = $dom->resolveExternals; echo "Read initial resolveExternals:\n"; var_dump( $test ); $dom->resolveExternals = TRUE; $test = $dom->resolveExternals; echo "Set resolveExternals to TRUE, reading again:\n"; var_dump( $test ); /** * Don't bother testing the resolveExternals functionality here, it throws warnings on html dtd * echo "Reloading xml with resolveExternals turned on\n"; $dom->loadXML($xml); $test = $dom->saveXML(); var_dump( $test ); */ echo "Done"; ?> --EXPECT-- DOMDocument with external entities created Read initial resolveExternals: bool(false) Set resolveExternals to TRUE, reading again: bool(true) Done