cvs: php-src /pear/tests pear_installer2.phpt
| From: | Greg Beaver | Date: | Mon, 15 Sep 2003 03:14:12 +0000 |
| Subject: | cvs: php-src /pear/tests pear_installer2.phpt | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-12738@lists.php.net to get a copy of this message | ||
cellog Sun Sep 14 23:14:12 2003 EDT
Modified files:
/php-src/pear/tests pear_installer2.phpt
Log:
add testing for baseinstalldir attribute
Index: php-src/pear/tests/pear_installer2.phpt
diff -u php-src/pear/tests/pear_installer2.phpt:1.6 php-src/pear/tests/pear_installer2.phpt:1.7
--- php-src/pear/tests/pear_installer2.phpt:1.6 Sun Sep 14 23:07:53 2003
+++ php-src/pear/tests/pear_installer2.phpt Sun Sep 14 23:14:12 2003
@@ -232,6 +232,25 @@
}
$installer->rollbackFileTransaction();
+echo "\ntest baseinstalldir:\n";
+var_dump($installer->_installFile('installer2.phpt.testfile.php',
array('role' => 'script',
+ 'baseinstalldir' => 'Foo/Mine'),
+ $temp_path . DIRECTORY_SEPARATOR . 'tmp', array()));
+echo "==>test baseinstalldir = 'Foo/Mine'. file exists? ";
+if (file_exists($temp_path . DIRECTORY_SEPARATOR . 'bin' . DIRECTORY_SEPARATOR .
+ 'Foo' . DIRECTORY_SEPARATOR . 'Mine' . DIRECTORY_SEPARATOR .
'.tmpinstaller2.phpt.testfile.php'))
+{
+ echo "yes\n";
+} else {
+ echo "no\n";
+}
+$installer->rollbackFileTransaction();
+
+rmdir($temp_path . DIRECTORY_SEPARATOR . 'bin' . DIRECTORY_SEPARATOR .
+ 'Foo' . DIRECTORY_SEPARATOR . 'Mine');
+rmdir($temp_path . DIRECTORY_SEPARATOR . 'bin' . DIRECTORY_SEPARATOR .
+ 'Foo');
+
unlink($temp_path . DIRECTORY_SEPARATOR . 'tmp' . DIRECTORY_SEPARATOR .
'installer2.phpt.testfile.php');
//cleanup
@@ -306,4 +325,8 @@
test install-as:
int(1)
==>test install as 'foobar.php'. file exists? yes
+
+test baseinstalldir:
+int(1)
+==>test baseinstalldir = 'Foo/Mine'. file exists? yes