Skip to content

Commit

Permalink
Bug #19034: test fails when executed from package dir (for PEAR QA team)
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.php.net/repository/pear/packages/XML_Parser/trunk@319354 c90b9560-bf6c-de11-be94-00142212c4b1
  • Loading branch information
ashnazg committed Nov 16, 2011
1 parent bbda0f6 commit 7a60948
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion tests/004b.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,13 @@ if (!extension_loaded('xml')) {
?>
--FILE--
<?php
require_once 'XML/Parser.php';
chdir (dirname(__FILE__));
if (file_exists('../Parser.php')) {
require_once "../Parser.php";
} else {
require_once "XML/Parser.php";
}

print 'New XML_Parser: ';
var_dump(strtolower(get_class($p = new XML_Parser())));
$e = $p->parseString("<?xml version='1.0' ?>\n<foo></bar>", true);
Expand Down

0 comments on commit 7a60948

Please sign in to comment.