]> granicus.if.org Git - php/commitdiff
new test
authorGreg Beaver <cellog@php.net>
Sat, 5 Jan 2008 04:27:01 +0000 (04:27 +0000)
committerGreg Beaver <cellog@php.net>
Sat, 5 Jan 2008 04:27:01 +0000 (04:27 +0000)
ext/phar/tests/frontcontroller3.phar [new file with mode: 0644]
ext/phar/tests/frontcontroller3.phar.inc [new file with mode: 0644]
ext/phar/tests/frontcontroller8.phpt [new file with mode: 0644]

diff --git a/ext/phar/tests/frontcontroller3.phar b/ext/phar/tests/frontcontroller3.phar
new file mode 100644 (file)
index 0000000..7ddcad2
Binary files /dev/null and b/ext/phar/tests/frontcontroller3.phar differ
diff --git a/ext/phar/tests/frontcontroller3.phar.inc b/ext/phar/tests/frontcontroller3.phar.inc
new file mode 100644 (file)
index 0000000..955606d
--- /dev/null
@@ -0,0 +1,12 @@
+<?php
+@unlink(dirname(__FILE__) . '/frontcontroller3.phar');
+$a = new Phar(dirname(__FILE__) . '/frontcontroller3.phar');
+$a['a.php'] = 'hio';
+$a['a.jpg'] = 'hio';
+$a['a.phps'] = '<?php function hio(){}';
+$a->setStub('<?php
+Phar::webPhar();
+echo "oops did not run\n";
+var_dump($_ENV, $_SERVER);
+__HALT_COMPILER();');
+?>
diff --git a/ext/phar/tests/frontcontroller8.phpt b/ext/phar/tests/frontcontroller8.phpt
new file mode 100644 (file)
index 0000000..812bb38
--- /dev/null
@@ -0,0 +1,20 @@
+--TEST--
+Phar front controller no index file 404
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--ENV--
+SCRIPT_NAME=/frontcontroller8.php/
+REQUEST_URI=/frontcontroller8.php/
+--FILE_EXTERNAL--
+frontcontroller3.phar
+--EXPECTHEADERS--
+Status: 404 Not Found
+--EXPECT--
+<html>
+ <head>
+  <title>File Not Found<title>
+ </head>
+ <body>
+  <h1>404 - File /index.php Not Found</h1>
+ </body>
+</html>
\ No newline at end of file