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

index 7ddcad29d486da6096fbc223f3886a9bd2f1b967..41c43d9da5b87a965bbae9d067149b90a81cd94b 100644 (file)
Binary files a/ext/phar/tests/frontcontroller3.phar and b/ext/phar/tests/frontcontroller3.phar differ
index 955606d111c6b65a8c069b1640024c108053f154..60d9ee07086dc25ae0e8cd8f55a621d76a219473 100644 (file)
@@ -5,7 +5,7 @@ $a['a.php'] = 'hio';
 $a['a.jpg'] = 'hio';
 $a['a.phps'] = '<?php function hio(){}';
 $a->setStub('<?php
-Phar::webPhar();
+Phar::webPhar("whatever", "index.php", null, array(), array("/hi" => "a.phps"));
 echo "oops did not run\n";
 var_dump($_ENV, $_SERVER);
 __HALT_COMPILER();');
index 812bb38efbd8179e9eaed08c75601882bfd2c408..ea46f36b3ce564ebdb825d45faac8860474518c6 100644 (file)
@@ -15,6 +15,6 @@ Status: 404 Not Found
   <title>File Not Found<title>
  </head>
  <body>
-  <h1>404 - File /index.php Not Found</h1>
+  <h1>404 - File index.php Not Found</h1>
  </body>
 </html>
\ No newline at end of file
diff --git a/ext/phar/tests/frontcontroller9.phpt b/ext/phar/tests/frontcontroller9.phpt
new file mode 100644 (file)
index 0000000..e5dc64e
--- /dev/null
@@ -0,0 +1,16 @@
+--TEST--
+Phar front controller rewrite array
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--ENV--
+SCRIPT_NAME=/frontcontroller9.php/hi
+REQUEST_URI=/frontcontroller9.php/hi
+--FILE_EXTERNAL--
+frontcontroller3.phar
+--EXPECTHEADERS--
+Content-type: text/html
+--EXPECT--
+<code><span style="color: #000000">
+<span style="color: #0000BB">&lt;?php&nbsp;</span><span style="color: #007700">function&nbsp;</span><span style="color: #0000BB">hio</span><span style="color: #007700">(){}</span>
+</span>
+</code>
\ No newline at end of file