Skip to content

Commit 7a60948

Browse files
committed
Bug #19034: test fails when executed from package dir (for PEAR QA team)
git-svn-id: https://svn.php.net/repository/pear/packages/XML_Parser/trunk@319354 c90b9560-bf6c-de11-be94-00142212c4b1
1 parent bbda0f6 commit 7a60948

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

tests/004b.phpt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,13 @@ if (!extension_loaded('xml')) {
1111
?>
1212
--FILE--
1313
<?php
14-
require_once 'XML/Parser.php';
14+
chdir (dirname(__FILE__));
15+
if (file_exists('../Parser.php')) {
16+
require_once "../Parser.php";
17+
} else {
18+
require_once "XML/Parser.php";
19+
}
20+
1521
print 'New XML_Parser: ';
1622
var_dump(strtolower(get_class($p = new XML_Parser())));
1723
$e = $p->parseString("<?xml version='1.0' ?>\n<foo></bar>", true);

0 commit comments

Comments
 (0)