pajoye Wed, 07 Sep 2011 09:19:28 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=316311
Log: - fix test for OS where dir sep is \ Changed paths: U php/php-src/branches/PHP_5_3/ext/xmlreader/tests/012.phpt U php/php-src/branches/PHP_5_4/ext/xmlreader/tests/012.phpt U php/php-src/trunk/ext/xmlreader/tests/012.phpt Modified: php/php-src/branches/PHP_5_3/ext/xmlreader/tests/012.phpt =================================================================== --- php/php-src/branches/PHP_5_3/ext/xmlreader/tests/012.phpt 2011-09-07 09:16:57 UTC (rev 316310) +++ php/php-src/branches/PHP_5_3/ext/xmlreader/tests/012.phpt 2011-09-07 09:19:28 UTC (rev 316311) @@ -25,7 +25,9 @@ EOF; $xmlstring = str_replace('012.dtd', dirname(__FILE__).'/012.dtd', $xmlstring); - +if (DIRECTORY_SEPARATOR == '\\') { + $xmlstring = str_replace('\\',"/", $xmlstring); +} $reader = new XMLReader(); $reader->XML($xmlstring); $reader->setParserProperty(XMLReader::DEFAULTATTRS, true); @@ -34,12 +36,15 @@ var_dump($reader->getAttribute('baz')); $reader->close(); -?> -===FILE=== -<?php +echo "\nUsing URI:\n"; +$reader = new XMLReader(); +$file = dirname(__FILE__) . '/012.xml'; +if (DIRECTORY_SEPARATOR == '\\') { + $file = str_replace('\\',"/", $file); +} -$reader = new XMLReader(); -$reader->open(dirname(__FILE__) . '/012.xml'); +$reader->open($file); + //$reader->setParserProperty(XMLReader::DEFAULTATTRS, true); while($reader->read() && $reader->nodeType != XMLReader::ELEMENT); var_dump($reader->getAttribute('bar')); @@ -61,7 +66,8 @@ NULL string(0) "" string(0) "" -===FILE=== + +Using URI: string(0) "" NULL string(0) "" Modified: php/php-src/branches/PHP_5_4/ext/xmlreader/tests/012.phpt =================================================================== --- php/php-src/branches/PHP_5_4/ext/xmlreader/tests/012.phpt 2011-09-07 09:16:57 UTC (rev 316310) +++ php/php-src/branches/PHP_5_4/ext/xmlreader/tests/012.phpt 2011-09-07 09:19:28 UTC (rev 316311) @@ -25,7 +25,9 @@ EOF; $xmlstring = str_replace('012.dtd', dirname(__FILE__).'/012.dtd', $xmlstring); - +if (DIRECTORY_SEPARATOR == '\\') { + $xmlstring = str_replace('\\',"/", $xmlstring); +} $reader = new XMLReader(); $reader->XML($xmlstring); $reader->setParserProperty(XMLReader::DEFAULTATTRS, true); @@ -34,12 +36,15 @@ var_dump($reader->getAttribute('baz')); $reader->close(); -?> -===FILE=== -<?php +echo "\nUsing URI:\n"; +$reader = new XMLReader(); +$file = dirname(__FILE__) . '/012.xml'; +if (DIRECTORY_SEPARATOR == '\\') { + $file = str_replace('\\',"/", $file); +} -$reader = new XMLReader(); -$reader->open(dirname(__FILE__) . '/012.xml'); +$reader->open($file); + //$reader->setParserProperty(XMLReader::DEFAULTATTRS, true); while($reader->read() && $reader->nodeType != XMLReader::ELEMENT); var_dump($reader->getAttribute('bar')); @@ -61,7 +66,8 @@ NULL string(0) "" string(0) "" -===FILE=== + +Using URI: string(0) "" NULL string(0) "" Modified: php/php-src/trunk/ext/xmlreader/tests/012.phpt =================================================================== --- php/php-src/trunk/ext/xmlreader/tests/012.phpt 2011-09-07 09:16:57 UTC (rev 316310) +++ php/php-src/trunk/ext/xmlreader/tests/012.phpt 2011-09-07 09:19:28 UTC (rev 316311) @@ -25,7 +25,9 @@ EOF; $xmlstring = str_replace('012.dtd', dirname(__FILE__).'/012.dtd', $xmlstring); - +if (DIRECTORY_SEPARATOR == '\\') { + $xmlstring = str_replace('\\',"/", $xmlstring); +} $reader = new XMLReader(); $reader->XML($xmlstring); $reader->setParserProperty(XMLReader::DEFAULTATTRS, true); @@ -34,12 +36,15 @@ var_dump($reader->getAttribute('baz')); $reader->close(); -?> -===FILE=== -<?php +echo "\nUsing URI:\n"; +$reader = new XMLReader(); +$file = dirname(__FILE__) . '/012.xml'; +if (DIRECTORY_SEPARATOR == '\\') { + $file = str_replace('\\',"/", $file); +} -$reader = new XMLReader(); -$reader->open(dirname(__FILE__) . '/012.xml'); +$reader->open($file); + //$reader->setParserProperty(XMLReader::DEFAULTATTRS, true); while($reader->read() && $reader->nodeType != XMLReader::ELEMENT); var_dump($reader->getAttribute('bar')); @@ -61,7 +66,8 @@ NULL string(0) "" string(0) "" -===FILE=== + +Using URI: string(0) "" NULL string(0) ""
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php