cvs: php-src /pear/tests pear_installer2.phpt
| From: | Greg Beaver | Date: | Mon, 15 Sep 2003 03:07:53 +0000 |
| Subject: | cvs: php-src /pear/tests pear_installer2.phpt | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-12737@lists.php.net to get a copy of this message | ||
cellog Sun Sep 14 23:07:53 2003 EDT
Modified files:
/php-src/pear/tests pear_installer2.phpt
Log:
add testing for install-as attribute
Index: php-src/pear/tests/pear_installer2.phpt
diff -u php-src/pear/tests/pear_installer2.phpt:1.5 php-src/pear/tests/pear_installer2.phpt:1.6
--- php-src/pear/tests/pear_installer2.phpt:1.5 Sun Sep 14 16:19:59 2003
+++ php-src/pear/tests/pear_installer2.phpt Sun Sep 14 23:07:53 2003
@@ -218,6 +218,20 @@
}
$installer->rollbackFileTransaction();
+echo "\ntest install-as:\n";
+var_dump($installer->_installFile('installer2.phpt.testfile.php',
array('role' => 'script',
+ 'install-as' => 'foobar.php'),
+ $temp_path . DIRECTORY_SEPARATOR . 'tmp', array()));
+echo "==>test install as 'foobar.php'. file exists? ";
+if (file_exists($temp_path . DIRECTORY_SEPARATOR . 'bin' . DIRECTORY_SEPARATOR .
+ '.tmpfoobar.php'))
+{
+ echo "yes\n";
+} else {
+ echo "no\n";
+}
+$installer->rollbackFileTransaction();
+
unlink($temp_path . DIRECTORY_SEPARATOR . 'tmp' . DIRECTORY_SEPARATOR .
'installer2.phpt.testfile.php');
//cleanup
@@ -288,3 +302,8 @@
==>test pear-config replacement: equals 'pear.php.net stuff'? => pear.php.net stuff
int(1)
==>test package-info replacement: equals 'Foo stuff'? => Foo stuff
+
+test install-as:
+int(1)
+==>test install as 'foobar.php'. file exists? yes
+