From 94ff2997368d755ee4cf20fb25f124abefe189a3 Mon Sep 17 00:00:00 2001 From: Greg Beaver Date: Fri, 30 Apr 2004 02:06:11 +0000 Subject: [PATCH] fix unit test to work with 1.3.2 (which will be needed) --- .../tests/pear_common_buildProvidesArray.phpt | 21 ++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/pear/tests/pear_common_buildProvidesArray.phpt b/pear/tests/pear_common_buildProvidesArray.phpt index d76c3503e1..b98208307a 100644 --- a/pear/tests/pear_common_buildProvidesArray.phpt +++ b/pear/tests/pear_common_buildProvidesArray.phpt @@ -54,6 +54,7 @@ fclose($fp); $ret = PEAR_Common::analyzeSourceCode($testdir . DIRECTORY_SEPARATOR . 'test5.php'); echo "pre-test: returns false with valid PHP? "; echo $ret ? "no\n" : "yes\n"; +$ret['source_file'] = str_replace(array(dirname(__FILE__),DIRECTORY_SEPARATOR), array('', '/'), $ret['source_file']); var_dump($ret); unlink($testdir . DIRECTORY_SEPARATOR . 'test5.php'); $common = new PEAR_Common; @@ -65,7 +66,9 @@ rmdir($testdir); --POST-- --EXPECT-- pre-test: returns false with valid PHP? no -array(5) { +array(6) { + ["source_file"]=> + string(45) "/pear_common_buildProvidesArraytest/test5.php" ["declared_classes"]=> array(2) { [0]=> @@ -110,14 +113,18 @@ array(1) { ["provides"]=> array(4) { ["class;test2"]=> - array(2) { + array(3) { + ["file"]=> + string(9) "test5.php" ["type"]=> string(5) "class" ["name"]=> string(5) "test2" } ["class;blah"]=> - array(3) { + array(4) { + ["file"]=> + string(9) "test5.php" ["type"]=> string(5) "class" ["name"]=> @@ -126,14 +133,18 @@ array(1) { string(5) "test2" } ["function;test"]=> - array(2) { + array(3) { + ["file"]=> + string(9) "test5.php" ["type"]=> string(8) "function" ["name"]=> string(4) "test" } ["function;fool"]=> - array(2) { + array(3) { + ["file"]=> + string(9) "test5.php" ["type"]=> string(8) "function" ["name"]=> -- 2.50.1