summaryrefslogtreecommitdiff
path: root/pear/tests
diff options
context:
space:
mode:
authorGreg Beaver <cellog@php.net>2003-10-31 22:30:37 +0000
committerGreg Beaver <cellog@php.net>2003-10-31 22:30:37 +0000
commitf51b3c0cb1de63b4aec76fb6ff936eade22786bf (patch)
tree34cc5f30bc0454a268e426aa83936c08133dee8d /pear/tests
parent5754cfe68cbbcf6a5dcb099a437918015f3a98d6 (diff)
downloadphp-git-f51b3c0cb1de63b4aec76fb6ff936eade22786bf.tar.gz
fix test 1, add in nifty SKIPIF code
Diffstat (limited to 'pear/tests')
-rw-r--r--pear/tests/pear_installer1.phpt14
1 files changed, 10 insertions, 4 deletions
diff --git a/pear/tests/pear_installer1.phpt b/pear/tests/pear_installer1.phpt
index 65fd5536fc..fe2516202b 100644
--- a/pear/tests/pear_installer1.phpt
+++ b/pear/tests/pear_installer1.phpt
@@ -1,7 +1,11 @@
--TEST--
PEAR_Installer test #1
--SKIPIF--
-skip
+<?php
+if (!getenv('PHP_PEAR_RUNTESTS')) {
+ echo 'skip';
+}
+?>
--FILE--
<?php
@@ -12,8 +16,9 @@ $ui = false;
$installer = new PEAR_Installer($ui);
echo "test extractDownloadFileName:\n";
echo 'existing file: ';
-echo $installer->extractDownloadFileName($temp_path . DIRECTORY_SEPARATOR . 'user.conf',
- $ui);
+echo ($temp_path . DIRECTORY_SEPARATOR . 'user.conf' ==
+ $installer->extractDownloadFileName($temp_path . DIRECTORY_SEPARATOR . 'user.conf',
+ $ui)) ? "yes\n" : "no\n";
var_dump($ui);
echo 'invalid match: ';
echo $installer->extractDownloadFileName('27',
@@ -70,7 +75,8 @@ var_dump($res);
--POST--
--EXPECT--
test extractDownloadFileName:
-existing file: c:\web pages\chiara\testinstallertemp\user.confbool(false)
+existing file: yes
+bool(false)
invalid match: 27
NULL
valid match, no version: Testpackage