1--TEST-- 2DOMDocument::$validateOnParse - read/write tests (dom_document_validate_on_parse_read/dom_document_validate_on_parse_write) 3--CREDITS-- 4Hans Zaunere 5# TestFest 2009 NYPHP 6--EXTENSIONS-- 7dom 8--FILE-- 9<?php 10 11require_once('dom_test.inc'); 12 13$dom = new DOMDocument; 14$dom->loadXML($xmlstr); 15 16if( !$dom ) 17{ 18 echo "Error while parsing the document\n"; 19 exit; 20} 21 22echo "Checking documented default value: "; 23var_dump($dom->validateOnParse); 24 25$dom->validateOnParse = TRUE; 26echo "Setting validateOnParse to TRUE: "; 27var_dump($dom->validateOnParse); 28 29$dom->validateOnParse = FALSE; 30echo "Setting validateOnParse to FALSE: "; 31var_dump($dom->validateOnParse); 32 33?> 34--EXPECT-- 35Checking documented default value: bool(false) 36Setting validateOnParse to TRUE: bool(true) 37Setting validateOnParse to FALSE: bool(false) 38