pajoye Wed, 07 Sep 2011 09:03:07 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=316309
Log:
- fix test for OS where dir sep is \
Changed paths:
U php/php-src/branches/PHP_5_3/ext/dom/tests/dom_xinclude.phpt
U php/php-src/branches/PHP_5_4/ext/dom/tests/dom_xinclude.phpt
U php/php-src/trunk/ext/dom/tests/dom_xinclude.phpt
Modified: php/php-src/branches/PHP_5_3/ext/dom/tests/dom_xinclude.phpt
===================================================================
--- php/php-src/branches/PHP_5_3/ext/dom/tests/dom_xinclude.phpt
2011-09-07 08:44:05 UTC (rev 316308)
+++ php/php-src/branches/PHP_5_3/ext/dom/tests/dom_xinclude.phpt
2011-09-07 09:03:07 UTC (rev 316309)
@@ -10,10 +10,14 @@
$dom = new domdocument;
$data = file_get_contents(dirname(__FILE__)."/xinclude.xml");
-$data =
str_replace('compress.zlib://ext/dom/tests/','compress.zlib://'.dirname(__FILE__).'/',
$data);
+$reldir = str_replace(getcwd(),".",dirname(__FILE__));
+if (DIRECTORY_SEPARATOR == '\\') {
+ $reldir = str_replace('\\',"/", $reldir);
+}
+$data =
str_replace('compress.zlib://ext/dom/tests/','compress.zlib://'.$reldir."/",
$data);
+
$dom->loadXML($data);
-
$dom->xinclude();
print $dom->saveXML()."\n";
foreach ($dom->documentElement->childNodes as $node) {
Modified: php/php-src/branches/PHP_5_4/ext/dom/tests/dom_xinclude.phpt
===================================================================
--- php/php-src/branches/PHP_5_4/ext/dom/tests/dom_xinclude.phpt
2011-09-07 08:44:05 UTC (rev 316308)
+++ php/php-src/branches/PHP_5_4/ext/dom/tests/dom_xinclude.phpt
2011-09-07 09:03:07 UTC (rev 316309)
@@ -10,10 +10,14 @@
$dom = new domdocument;
$data = file_get_contents(dirname(__FILE__)."/xinclude.xml");
-$data =
str_replace('compress.zlib://ext/dom/tests/','compress.zlib://'.dirname(__FILE__).'/',
$data);
+$reldir = str_replace(getcwd(),".",dirname(__FILE__));
+if (DIRECTORY_SEPARATOR == '\\') {
+ $reldir = str_replace('\\',"/", $reldir);
+}
+$data =
str_replace('compress.zlib://ext/dom/tests/','compress.zlib://'.$reldir."/",
$data);
+
$dom->loadXML($data);
-
$dom->xinclude();
print $dom->saveXML()."\n";
foreach ($dom->documentElement->childNodes as $node) {
Modified: php/php-src/trunk/ext/dom/tests/dom_xinclude.phpt
===================================================================
--- php/php-src/trunk/ext/dom/tests/dom_xinclude.phpt 2011-09-07 08:44:05 UTC
(rev 316308)
+++ php/php-src/trunk/ext/dom/tests/dom_xinclude.phpt 2011-09-07 09:03:07 UTC
(rev 316309)
@@ -10,10 +10,14 @@
$dom = new domdocument;
$data = file_get_contents(dirname(__FILE__)."/xinclude.xml");
-$data =
str_replace('compress.zlib://ext/dom/tests/','compress.zlib://'.dirname(__FILE__).'/',
$data);
+$reldir = str_replace(getcwd(),".",dirname(__FILE__));
+if (DIRECTORY_SEPARATOR == '\\') {
+ $reldir = str_replace('\\',"/", $reldir);
+}
+$data =
str_replace('compress.zlib://ext/dom/tests/','compress.zlib://'.$reldir."/",
$data);
+
$dom->loadXML($data);
-
$dom->xinclude();
print $dom->saveXML()."\n";
foreach ($dom->documentElement->childNodes as $node) {
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php