]> granicus.if.org Git - php/commitdiff
Add missing SKIPIF, rename vars for readability
authorSteph Fox <sfox@php.net>
Tue, 12 Feb 2008 16:55:50 +0000 (16:55 +0000)
committerSteph Fox <sfox@php.net>
Tue, 12 Feb 2008 16:55:50 +0000 (16:55 +0000)
ext/phar/tests/zf_test.phpt

index 32511d4cdc1a2aaa7a03b8b6ff7be83b27633561..7435f34d51910f53c32ac3300d6dd87058d6ba9e 100644 (file)
@@ -1,40 +1,47 @@
 --TEST--
 test broken app
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
 --INI--
 phar.readonly=0
 --FILE--
 <?php
+
 $file = "zfapp";
 $tgz_file = dirname(__FILE__) . "/$file.tgz";
 chdir(dirname(__FILE__));
-$phar_file = basename(__FILE__, '.php') . '.phar.php';
+
+$phar_file = basename(__FILE__, '.php') . '.phar';
 @unlink($phar_file);
 copy($tgz_file, $phar_file);
-$a = new Phar($phar_file);
-$a->startBuffering();
-$a->setStub("<?php
+
+$phar = new Phar($phar_file);
+$phar->startBuffering();
+$phar->setStub("<?php
 Phar::interceptFileFuncs();
 Phar::webPhar('$file.phar', 'html/index.php');
 echo 'BlogApp is intended to be executed from a web browser\n';
 exit -1;
 __HALT_COMPILER();
 ");
-$a->stopBuffering();
-foreach(new RecursiveIteratorIterator($a) as $f) {
-echo str_replace('\\', '/', $f->getPathName()) . "\n";
+$phar->stopBuffering();
+
+foreach(new RecursiveIteratorIterator($phar) as $path) {
+    echo str_replace('\\', '/', $path->getPathName()) . "\n";
 }
+
 ?>
 ===DONE===
 --CLEAN--
 <?php
-unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php');
+unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar');
 __HALT_COMPILER();
 ?>
 --EXPECTF--
-phar://%szf_test.phar.php/application/default/controllers/ErrorController.php
-phar://%szf_test.phar.php/application/default/controllers/IndexController.php
-phar://%szf_test.phar.php/application/default/views/scripts/error/error.phtml
-phar://%szf_test.phar.php/application/default/views/scripts/index/index.phtml
-phar://%szf_test.phar.php/html/.htaccess
-phar://%szf_test.phar.php/html/index.php
+phar://%szf_test.phar/application/default/controllers/ErrorController.php
+phar://%szf_test.phar/application/default/controllers/IndexController.php
+phar://%szf_test.phar/application/default/views/scripts/error/error.phtml
+phar://%szf_test.phar/application/default/views/scripts/index/index.phtml
+phar://%szf_test.phar/html/.htaccess
+phar://%szf_test.phar/html/index.php
 ===DONE===