Browse Source

- fix test for OS where dir sep is \

pull/12/head
Pierre Joye 15 years ago
parent
commit
8fca015947
  1. 8
      ext/dom/tests/dom_xinclude.phpt

8
ext/dom/tests/dom_xinclude.phpt

@ -10,10 +10,14 @@ in_array('compress.zlib', stream_get_wrappers()) or die('skip compress.zlib wrap
$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->loadXML($data);
$dom->xinclude();
print $dom->saveXML()."\n";
foreach ($dom->documentElement->childNodes as $node) {

Loading…
Cancel
Save