]> granicus.if.org Git - php/commitdiff
fix unit test to work with 1.3.2 (which will be needed)
authorGreg Beaver <cellog@php.net>
Fri, 30 Apr 2004 02:06:11 +0000 (02:06 +0000)
committerGreg Beaver <cellog@php.net>
Fri, 30 Apr 2004 02:06:11 +0000 (02:06 +0000)
pear/tests/pear_common_buildProvidesArray.phpt

index d76c3503e1c6135f60d46efbf0fe64f15314bf6d..b98208307a3a4549f6bef2146a5d28e467a98300 100644 (file)
@@ -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"]=>