summaryrefslogtreecommitdiff
path: root/pear
diff options
context:
space:
mode:
authorGreg Beaver <cellog@php.net>2004-04-30 02:06:11 +0000
committerGreg Beaver <cellog@php.net>2004-04-30 02:06:11 +0000
commit94ff2997368d755ee4cf20fb25f124abefe189a3 (patch)
treef5978b504b9ebe53eaeb4eae026ab70742d837ab /pear
parentaf03ecf9e193cfced74c3454f17dc1bf36f61ad0 (diff)
downloadphp-git-94ff2997368d755ee4cf20fb25f124abefe189a3.tar.gz
fix unit test to work with 1.3.2 (which will be needed)
Diffstat (limited to 'pear')
-rw-r--r--pear/tests/pear_common_buildProvidesArray.phpt21
1 files 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"]=>