]> granicus.if.org Git - php/commitdiff
- Somehow 'cvs add' managed to ignore these completely(?)
authorSteph Fox <sfox@php.net>
Fri, 1 Aug 2008 17:34:03 +0000 (17:34 +0000)
committerSteph Fox <sfox@php.net>
Fri, 1 Aug 2008 17:34:03 +0000 (17:34 +0000)
52 files changed:
ext/phar/tests/cache_list/files/frontcontroller.phar [new file with mode: 0644]
ext/phar/tests/cache_list/files/frontcontroller10.phar [new file with mode: 0644]
ext/phar/tests/cache_list/files/frontcontroller11.phar [new file with mode: 0644]
ext/phar/tests/cache_list/files/frontcontroller12.phar [new file with mode: 0644]
ext/phar/tests/cache_list/files/frontcontroller13.phar [new file with mode: 0644]
ext/phar/tests/cache_list/files/frontcontroller14.phar [new file with mode: 0644]
ext/phar/tests/cache_list/files/frontcontroller16.phar [new file with mode: 0644]
ext/phar/tests/cache_list/files/frontcontroller17.phar [new file with mode: 0644]
ext/phar/tests/cache_list/files/frontcontroller18.phar [new file with mode: 0644]
ext/phar/tests/cache_list/files/frontcontroller19.phar [new file with mode: 0644]
ext/phar/tests/cache_list/files/frontcontroller2.phar [new file with mode: 0644]
ext/phar/tests/cache_list/files/frontcontroller3.phar [new file with mode: 0644]
ext/phar/tests/cache_list/files/frontcontroller4.phar [new file with mode: 0644]
ext/phar/tests/cache_list/files/frontcontroller5.phar [new file with mode: 0644]
ext/phar/tests/cache_list/files/frontcontroller6.phar [new file with mode: 0644]
ext/phar/tests/cache_list/files/frontcontroller7.phar [new file with mode: 0644]
ext/phar/tests/cache_list/files/frontcontroller8.phar [new file with mode: 0644]
ext/phar/tests/cache_list/files/frontcontroller9.phar [new file with mode: 0644]
ext/phar/tests/cache_list/frontcontroller1.phpt [new file with mode: 0644]
ext/phar/tests/cache_list/frontcontroller10.phpt [new file with mode: 0644]
ext/phar/tests/cache_list/frontcontroller11.phpt [new file with mode: 0644]
ext/phar/tests/cache_list/frontcontroller12.phpt [new file with mode: 0644]
ext/phar/tests/cache_list/frontcontroller13.phpt [new file with mode: 0644]
ext/phar/tests/cache_list/frontcontroller14.phpt [new file with mode: 0644]
ext/phar/tests/cache_list/frontcontroller15.phpt [new file with mode: 0644]
ext/phar/tests/cache_list/frontcontroller16.phpt [new file with mode: 0644]
ext/phar/tests/cache_list/frontcontroller17.phpt [new file with mode: 0644]
ext/phar/tests/cache_list/frontcontroller18.phpt [new file with mode: 0644]
ext/phar/tests/cache_list/frontcontroller19.phpt [new file with mode: 0644]
ext/phar/tests/cache_list/frontcontroller2.phpt [new file with mode: 0644]
ext/phar/tests/cache_list/frontcontroller20.phpt [new file with mode: 0644]
ext/phar/tests/cache_list/frontcontroller21.phpt [new file with mode: 0644]
ext/phar/tests/cache_list/frontcontroller22.phpt [new file with mode: 0644]
ext/phar/tests/cache_list/frontcontroller23.phpt [new file with mode: 0644]
ext/phar/tests/cache_list/frontcontroller24.phpt [new file with mode: 0644]
ext/phar/tests/cache_list/frontcontroller25.phpt [new file with mode: 0644]
ext/phar/tests/cache_list/frontcontroller26.phpt [new file with mode: 0644]
ext/phar/tests/cache_list/frontcontroller27.phpt [new file with mode: 0644]
ext/phar/tests/cache_list/frontcontroller28.phpt [new file with mode: 0644]
ext/phar/tests/cache_list/frontcontroller29.phpt [new file with mode: 0644]
ext/phar/tests/cache_list/frontcontroller3.phpt [new file with mode: 0644]
ext/phar/tests/cache_list/frontcontroller30.phpt [new file with mode: 0644]
ext/phar/tests/cache_list/frontcontroller31.phpt [new file with mode: 0644]
ext/phar/tests/cache_list/frontcontroller32.phpt [new file with mode: 0644]
ext/phar/tests/cache_list/frontcontroller33.phpt [new file with mode: 0644]
ext/phar/tests/cache_list/frontcontroller34.phpt [new file with mode: 0644]
ext/phar/tests/cache_list/frontcontroller4.phpt [new file with mode: 0644]
ext/phar/tests/cache_list/frontcontroller5.phpt [new file with mode: 0644]
ext/phar/tests/cache_list/frontcontroller6.phpt [new file with mode: 0644]
ext/phar/tests/cache_list/frontcontroller7.phpt [new file with mode: 0644]
ext/phar/tests/cache_list/frontcontroller8.phpt [new file with mode: 0644]
ext/phar/tests/cache_list/frontcontroller9.phpt [new file with mode: 0644]

diff --git a/ext/phar/tests/cache_list/files/frontcontroller.phar b/ext/phar/tests/cache_list/files/frontcontroller.phar
new file mode 100644 (file)
index 0000000..626bf48
Binary files /dev/null and b/ext/phar/tests/cache_list/files/frontcontroller.phar differ
diff --git a/ext/phar/tests/cache_list/files/frontcontroller10.phar b/ext/phar/tests/cache_list/files/frontcontroller10.phar
new file mode 100644 (file)
index 0000000..078ce75
Binary files /dev/null and b/ext/phar/tests/cache_list/files/frontcontroller10.phar differ
diff --git a/ext/phar/tests/cache_list/files/frontcontroller11.phar b/ext/phar/tests/cache_list/files/frontcontroller11.phar
new file mode 100644 (file)
index 0000000..61ea843
Binary files /dev/null and b/ext/phar/tests/cache_list/files/frontcontroller11.phar differ
diff --git a/ext/phar/tests/cache_list/files/frontcontroller12.phar b/ext/phar/tests/cache_list/files/frontcontroller12.phar
new file mode 100644 (file)
index 0000000..9e45587
Binary files /dev/null and b/ext/phar/tests/cache_list/files/frontcontroller12.phar differ
diff --git a/ext/phar/tests/cache_list/files/frontcontroller13.phar b/ext/phar/tests/cache_list/files/frontcontroller13.phar
new file mode 100644 (file)
index 0000000..750ff27
Binary files /dev/null and b/ext/phar/tests/cache_list/files/frontcontroller13.phar differ
diff --git a/ext/phar/tests/cache_list/files/frontcontroller14.phar b/ext/phar/tests/cache_list/files/frontcontroller14.phar
new file mode 100644 (file)
index 0000000..78a42a9
Binary files /dev/null and b/ext/phar/tests/cache_list/files/frontcontroller14.phar differ
diff --git a/ext/phar/tests/cache_list/files/frontcontroller16.phar b/ext/phar/tests/cache_list/files/frontcontroller16.phar
new file mode 100644 (file)
index 0000000..cce5db5
Binary files /dev/null and b/ext/phar/tests/cache_list/files/frontcontroller16.phar differ
diff --git a/ext/phar/tests/cache_list/files/frontcontroller17.phar b/ext/phar/tests/cache_list/files/frontcontroller17.phar
new file mode 100644 (file)
index 0000000..b83d41f
Binary files /dev/null and b/ext/phar/tests/cache_list/files/frontcontroller17.phar differ
diff --git a/ext/phar/tests/cache_list/files/frontcontroller18.phar b/ext/phar/tests/cache_list/files/frontcontroller18.phar
new file mode 100644 (file)
index 0000000..c447f39
Binary files /dev/null and b/ext/phar/tests/cache_list/files/frontcontroller18.phar differ
diff --git a/ext/phar/tests/cache_list/files/frontcontroller19.phar b/ext/phar/tests/cache_list/files/frontcontroller19.phar
new file mode 100644 (file)
index 0000000..bdf8ee1
Binary files /dev/null and b/ext/phar/tests/cache_list/files/frontcontroller19.phar differ
diff --git a/ext/phar/tests/cache_list/files/frontcontroller2.phar b/ext/phar/tests/cache_list/files/frontcontroller2.phar
new file mode 100644 (file)
index 0000000..0dd0e7f
Binary files /dev/null and b/ext/phar/tests/cache_list/files/frontcontroller2.phar differ
diff --git a/ext/phar/tests/cache_list/files/frontcontroller3.phar b/ext/phar/tests/cache_list/files/frontcontroller3.phar
new file mode 100644 (file)
index 0000000..afcf03a
Binary files /dev/null and b/ext/phar/tests/cache_list/files/frontcontroller3.phar differ
diff --git a/ext/phar/tests/cache_list/files/frontcontroller4.phar b/ext/phar/tests/cache_list/files/frontcontroller4.phar
new file mode 100644 (file)
index 0000000..4c9a92a
Binary files /dev/null and b/ext/phar/tests/cache_list/files/frontcontroller4.phar differ
diff --git a/ext/phar/tests/cache_list/files/frontcontroller5.phar b/ext/phar/tests/cache_list/files/frontcontroller5.phar
new file mode 100644 (file)
index 0000000..f206b59
Binary files /dev/null and b/ext/phar/tests/cache_list/files/frontcontroller5.phar differ
diff --git a/ext/phar/tests/cache_list/files/frontcontroller6.phar b/ext/phar/tests/cache_list/files/frontcontroller6.phar
new file mode 100644 (file)
index 0000000..f4a8265
Binary files /dev/null and b/ext/phar/tests/cache_list/files/frontcontroller6.phar differ
diff --git a/ext/phar/tests/cache_list/files/frontcontroller7.phar b/ext/phar/tests/cache_list/files/frontcontroller7.phar
new file mode 100644 (file)
index 0000000..07884b2
Binary files /dev/null and b/ext/phar/tests/cache_list/files/frontcontroller7.phar differ
diff --git a/ext/phar/tests/cache_list/files/frontcontroller8.phar b/ext/phar/tests/cache_list/files/frontcontroller8.phar
new file mode 100644 (file)
index 0000000..ec05cea
Binary files /dev/null and b/ext/phar/tests/cache_list/files/frontcontroller8.phar differ
diff --git a/ext/phar/tests/cache_list/files/frontcontroller9.phar b/ext/phar/tests/cache_list/files/frontcontroller9.phar
new file mode 100644 (file)
index 0000000..39ca28c
Binary files /dev/null and b/ext/phar/tests/cache_list/files/frontcontroller9.phar differ
diff --git a/ext/phar/tests/cache_list/frontcontroller1.phpt b/ext/phar/tests/cache_list/frontcontroller1.phpt
new file mode 100644 (file)
index 0000000..d0d5552
--- /dev/null
@@ -0,0 +1,17 @@
+--TEST--
+Phar front controller other
+--INI--
+phar.cache_list={PWD}/frontcontroller1.php [cache_list]
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--ENV--
+SCRIPT_NAME=/frontcontroller1.php
+REQUEST_URI=/frontcontroller1.php/a.jpg
+PATH_INFO=/a.jpg
+--FILE_EXTERNAL--
+files/frontcontroller.phar
+--EXPECTHEADERS--
+Content-type: image/jpeg
+Content-length: 3
+--EXPECT--
+hio
diff --git a/ext/phar/tests/cache_list/frontcontroller10.phpt b/ext/phar/tests/cache_list/frontcontroller10.phpt
new file mode 100644 (file)
index 0000000..00177d4
--- /dev/null
@@ -0,0 +1,25 @@
+--TEST--
+Phar front controller rewrite access denied [cache_list]
+--INI--
+default_charset=UTF-8
+phar.cache_list={PWD}/frontcontroller10.php
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--ENV--
+SCRIPT_NAME=/frontcontroller10.php
+REQUEST_URI=/frontcontroller10.php/hi
+PATH_INFO=/hi
+--FILE_EXTERNAL--
+files/frontcontroller4.phar
+--EXPECTHEADERS--
+Content-type: text/html; charset=UTF-8
+Status: 403 Access Denied
+--EXPECT--
+<html>
+ <head>
+  <title>Access Denied</title>
+ </head>
+ <body>
+  <h1>403 - File /hi Access Denied</h1>
+ </body>
+</html>
diff --git a/ext/phar/tests/cache_list/frontcontroller11.phpt b/ext/phar/tests/cache_list/frontcontroller11.phpt
new file mode 100644 (file)
index 0000000..25b147e
--- /dev/null
@@ -0,0 +1,22 @@
+--TEST--
+Phar front controller mime type extension is not a string [cache_list]
+--INI--
+default_charset=UTF-8
+phar.cache_list={PWD}/frontcontroller11.php
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+<?php die("skip"); ?>
+--ENV--
+SCRIPT_NAME=/frontcontroller11.php
+REQUEST_URI=/frontcontroller11.php/a.php
+PATH_INFO=/a.php
+--FILE_EXTERNAL--
+files/frontcontroller5.phar
+--EXPECTHEADERS--
+Content-type: text/html; charset=UTF-8
+--EXPECTF--
+Fatal error: Uncaught exception 'PharException' with message 'Key of MIME type overrides array must be a file extension, was "0"' in %sfrontcontroller11.php:2
+Stack trace:
+#0 %sfrontcontroller11.php(2): Phar::webPhar('whatever', 'index.php', '', Array)
+#1 {main}
+  thrown in %sfrontcontroller11.php on line 2
\ No newline at end of file
diff --git a/ext/phar/tests/cache_list/frontcontroller12.phpt b/ext/phar/tests/cache_list/frontcontroller12.phpt
new file mode 100644 (file)
index 0000000..cfc7d0e
--- /dev/null
@@ -0,0 +1,21 @@
+--TEST--
+Phar front controller mime type unknown int [cache_list]
+--INI--
+default_charset=UTF-8
+phar.cache_list={PWD}/frontcontroller12.php
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--ENV--
+SCRIPT_NAME=/frontcontroller12.php
+REQUEST_URI=/frontcontroller12.php/a.php
+PATH_INFO=/a.php
+--FILE_EXTERNAL--
+files/frontcontroller6.phar
+--EXPECTHEADERS--
+Content-type: text/html; charset=UTF-8
+--EXPECTF--
+Fatal error: Uncaught exception 'PharException' with message 'Unknown mime type specifier used, only Phar::PHP, Phar::PHPS and a mime type string are allowed' in %sfrontcontroller12.php:2
+Stack trace:
+#0 %sfrontcontroller12.php(2): Phar::webPhar('whatever', 'index.php', '', Array)
+#1 {main}
+  thrown in %sfrontcontroller12.php on line 2
\ No newline at end of file
diff --git a/ext/phar/tests/cache_list/frontcontroller13.phpt b/ext/phar/tests/cache_list/frontcontroller13.phpt
new file mode 100644 (file)
index 0000000..e6c9dee
--- /dev/null
@@ -0,0 +1,21 @@
+--TEST--
+Phar front controller mime type not string/int [cache_list]
+--INI--
+default_charset=UTF-8
+phar.cache_list={PWD}/frontcontroller13.php
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--ENV--
+SCRIPT_NAME=/frontcontroller13.php
+REQUEST_URI=/frontcontroller13.php/a.php
+PATH_INFO=/a.php
+--FILE_EXTERNAL--
+files/frontcontroller7.phar
+--EXPECTHEADERS--
+Content-type: text/html; charset=UTF-8
+--EXPECTF--
+Fatal error: Uncaught exception 'PharException' with message 'Unknown mime type specifier used (not a string or int), only Phar::PHP, Phar::PHPS and a mime type string are allowed' in %sfrontcontroller13.php:2
+Stack trace:
+#0 %sfrontcontroller13.php(2): Phar::webPhar('whatever', 'index.php', '', Array)
+#1 {main}
+  thrown in %sfrontcontroller13.php on line 2
\ No newline at end of file
diff --git a/ext/phar/tests/cache_list/frontcontroller14.phpt b/ext/phar/tests/cache_list/frontcontroller14.phpt
new file mode 100644 (file)
index 0000000..bbd9637
--- /dev/null
@@ -0,0 +1,17 @@
+--TEST--
+Phar front controller mime type override, other [cache_list]
+--INI--
+phar.cache_list={PWD}/frontcontroller14.php
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--ENV--
+SCRIPT_NAME=/frontcontroller14.php
+REQUEST_URI=/frontcontroller14.php/a.jpg
+PATH_INFO=/a.jpg
+--FILE_EXTERNAL--
+files/frontcontroller8.phar
+--EXPECTHEADERS--
+Content-type: foo/bar
+Content-length: 4
+--EXPECT--
+hio2
diff --git a/ext/phar/tests/cache_list/frontcontroller15.phpt b/ext/phar/tests/cache_list/frontcontroller15.phpt
new file mode 100644 (file)
index 0000000..d142a5d
--- /dev/null
@@ -0,0 +1,21 @@
+--TEST--
+Phar front controller mime type override, Phar::PHPS [cache_list]
+--INI--
+default_charset=UTF-8
+phar.cache_list={PWD}/frontcontroller15.php
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--ENV--
+SCRIPT_NAME=/frontcontroller15.php
+REQUEST_URI=/frontcontroller15.php/a.php
+PATH_INFO=/a.php
+--FILE_EXTERNAL--
+files/frontcontroller8.phar
+--EXPECTHEADERS--
+Content-type: text/html; charset=UTF-8
+--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>
+
diff --git a/ext/phar/tests/cache_list/frontcontroller16.phpt b/ext/phar/tests/cache_list/frontcontroller16.phpt
new file mode 100644 (file)
index 0000000..10bebdc
--- /dev/null
@@ -0,0 +1,18 @@
+--TEST--
+Phar front controller mime type override, Phar::PHP [cache_list]
+--INI--
+default_charset=UTF-8
+phar.cache_list={PWD}/frontcontroller16.php
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--ENV--
+SCRIPT_NAME=/frontcontroller16.php
+REQUEST_URI=/frontcontroller16.php/a.phps
+PATH_INFO=/a.phps
+--FILE_EXTERNAL--
+files/frontcontroller8.phar
+--EXPECTHEADERS--
+Content-type: text/html; charset=UTF-8
+--EXPECT--
+hio1
+
diff --git a/ext/phar/tests/cache_list/frontcontroller17.phpt b/ext/phar/tests/cache_list/frontcontroller17.phpt
new file mode 100644 (file)
index 0000000..35d3ae4
--- /dev/null
@@ -0,0 +1,18 @@
+--TEST--
+Phar front controller mime type unknown [cache_list]
+--INI--
+phar.cache_list={PWD}/frontcontroller17.php
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--ENV--
+SCRIPT_NAME=/frontcontroller17.php
+REQUEST_URI=/frontcontroller17.php/fronk.gronk
+PATH_INFO=/fronk.gronk
+--FILE_EXTERNAL--
+files/frontcontroller8.phar
+--EXPECTHEADERS--
+Content-type: application/octet-stream
+Content-length: 4
+--EXPECT--
+hio3
+
diff --git a/ext/phar/tests/cache_list/frontcontroller18.phpt b/ext/phar/tests/cache_list/frontcontroller18.phpt
new file mode 100644 (file)
index 0000000..5e94bf6
--- /dev/null
@@ -0,0 +1,18 @@
+--TEST--
+Phar front controller $_SERVER munging failure [cache_list]
+--INI--
+phar.cache_list={PWD}/frontcontroller18.php
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--ENV--
+SCRIPT_NAME=/frontcontroller18.php
+REQUEST_URI=/frontcontroller18.php/fronk.gronk
+PATH_INFO=/fronk.gronk
+--FILE_EXTERNAL--
+files/frontcontroller9.phar
+--EXPECTF--
+Fatal error: Uncaught exception 'PharException' with message 'No values passed to Phar::mungServer(), expecting an array of any of these strings: PHP_SELF, REQUEST_URI, SCRIPT_FILENAME, SCRIPT_NAME' in %sfrontcontroller18.php:2
+Stack trace:
+#0 %sfrontcontroller18.php(2): Phar::mungServer(Array)
+#1 {main}
+  thrown in %sfrontcontroller18.php on line 2
diff --git a/ext/phar/tests/cache_list/frontcontroller19.phpt b/ext/phar/tests/cache_list/frontcontroller19.phpt
new file mode 100644 (file)
index 0000000..bed0b1d
--- /dev/null
@@ -0,0 +1,18 @@
+--TEST--
+Phar front controller $_SERVER munging failure 2 [cache_list]
+--INI--
+phar.cache_list={PWD}/frontcontroller19.php
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--ENV--
+SCRIPT_NAME=/frontcontroller19.php
+REQUEST_URI=/frontcontroller19.php/
+PATH_INFO=/
+--FILE_EXTERNAL--
+files/frontcontroller10.phar
+--EXPECTF--
+Fatal error: Uncaught exception 'PharException' with message 'Too many values passed to Phar::mungServer(), expecting an array of any of these strings: PHP_SELF, REQUEST_URI, SCRIPT_FILENAME, SCRIPT_NAME' in %sfrontcontroller19.php:2
+Stack trace:
+#0 %sfrontcontroller19.php(2): Phar::mungServer(Array)
+#1 {main}
+  thrown in %sfrontcontroller19.php on line 2
diff --git a/ext/phar/tests/cache_list/frontcontroller2.phpt b/ext/phar/tests/cache_list/frontcontroller2.phpt
new file mode 100644 (file)
index 0000000..67ccfc1
--- /dev/null
@@ -0,0 +1,17 @@
+--TEST--
+Phar front controller PHP test [cache_list]
+--INI--
+default_charset=UTF-8
+phar.cache_list=frontcontroller2.php
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--ENV--
+SCRIPT_NAME=/frontcontroller2.php
+REQUEST_URI=/frontcontroller2.php/a.php
+PATH_INFO=/a.php
+--FILE_EXTERNAL--
+files/frontcontroller.phar
+--EXPECTHEADERS--
+Content-type: text/html; charset=UTF-8
+--EXPECT--
+hio
diff --git a/ext/phar/tests/cache_list/frontcontroller20.phpt b/ext/phar/tests/cache_list/frontcontroller20.phpt
new file mode 100644 (file)
index 0000000..bf333c7
--- /dev/null
@@ -0,0 +1,18 @@
+--TEST--
+Phar front controller $_SERVER munging failure 3 [cache_list]
+--INI--
+phar.cache_list={PWD}/frontcontroller20.php
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--ENV--
+SCRIPT_NAME=/frontcontroller20.php
+REQUEST_URI=/frontcontroller20.php/
+PATH_INFO=/
+--FILE_EXTERNAL--
+files/frontcontroller11.phar
+--EXPECTF--
+Fatal error: Uncaught exception 'PharException' with message 'Non-string value passed to Phar::mungServer(), expecting an array of any of these strings: PHP_SELF, REQUEST_URI, SCRIPT_FILENAME, SCRIPT_NAME' in %sfrontcontroller20.php:2
+Stack trace:
+#0 %sfrontcontroller20.php(2): Phar::mungServer(Array)
+#1 {main}
+  thrown in %sfrontcontroller20.php on line 2
diff --git a/ext/phar/tests/cache_list/frontcontroller21.phpt b/ext/phar/tests/cache_list/frontcontroller21.phpt
new file mode 100644 (file)
index 0000000..9ed315d
--- /dev/null
@@ -0,0 +1,25 @@
+--TEST--
+Phar front controller $_SERVER munging success [cache_list]
+--INI--
+default_charset=UTF-8
+phar.cache_list={PWD}/frontcontroller21.php
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--ENV--
+SCRIPT_NAME=/frontcontroller21.php
+REQUEST_URI=/frontcontroller21.php/index.php?test=hi
+PATH_INFO=/index.php
+QUERY_STRING=test=hi
+--FILE_EXTERNAL--
+files/frontcontroller12.phar
+--EXPECTHEADERS--
+Content-type: text/html; charset=UTF-8
+--EXPECTF--
+string(10) "/index.php"
+string(10) "/index.php"
+string(%d) "phar://%sfrontcontroller21.php/index.php"
+string(18) "/index.php?test=hi"
+string(32) "/frontcontroller21.php/index.php"
+string(22) "/frontcontroller21.php"
+string(%d) "%sfrontcontroller21.php"
+string(40) "/frontcontroller21.php/index.php?test=hi"
\ No newline at end of file
diff --git a/ext/phar/tests/cache_list/frontcontroller22.phpt b/ext/phar/tests/cache_list/frontcontroller22.phpt
new file mode 100644 (file)
index 0000000..82a8389
--- /dev/null
@@ -0,0 +1,22 @@
+--TEST--
+Phar front controller include from cwd test 1 [cache_list]
+--INI--
+default_charset=UTF-8
+phar.cache_list={PWD}/frontcontroller22.phpt
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--ENV--
+SCRIPT_NAME=/frontcontroller22.php
+REQUEST_URI=/frontcontroller22.php/index.php
+PATH_INFO=/index.php
+--FILE_EXTERNAL--
+files/frontcontroller13.phar
+--EXPECTHEADERS--
+Content-type: text/html; charset=UTF-8
+--EXPECTF--
+string(4) "test"
+string(12) "oof/test.php"
+
+Warning: include(./hi.php): failed to open stream: No such file or directory in phar://%s/oof/test.php on line %d
+
+Warning: include(): Failed opening './hi.php' for inclusion (include_path='%s') in phar://%soof/test.php on line %d
\ No newline at end of file
diff --git a/ext/phar/tests/cache_list/frontcontroller23.phpt b/ext/phar/tests/cache_list/frontcontroller23.phpt
new file mode 100644 (file)
index 0000000..3da9631
--- /dev/null
@@ -0,0 +1,18 @@
+--TEST--
+Phar front controller with generic action router test [cache_list]
+--INI--
+default_charset=UTF-8
+phar.cache_list={PWD}/frontcontroller23.php
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--ENV--
+SCRIPT_NAME=/frontcontroller23.php
+REQUEST_URI=/frontcontroller23.php/hi/there
+PATH_INFO=/hi/there
+--FILE_EXTERNAL--
+files/frontcontroller14.phar
+--EXPECTHEADERS--
+Content-type: text/html; charset=UTF-8
+--EXPECTF--
+string(9) "/hi/there"
+string(%d) "phar://%sfrontcontroller23.php/html/index.php"
\ No newline at end of file
diff --git a/ext/phar/tests/cache_list/frontcontroller24.phpt b/ext/phar/tests/cache_list/frontcontroller24.phpt
new file mode 100644 (file)
index 0000000..561826b
--- /dev/null
@@ -0,0 +1,17 @@
+--TEST--
+Phar front controller with custom 404 php script [cache_list]
+--INI--
+default_charset=UTF-8
+phar.cache_list={PWD}/frontcontroller24.php
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--ENV--
+SCRIPT_NAME=/frontcontroller24.php
+REQUEST_URI=/frontcontroller24.php/unknown/file
+PATH_INFO=/unknown/file
+--FILE_EXTERNAL--
+files/frontcontroller8.phar
+--EXPECTHEADERS--
+Content-type: text/html; charset=UTF-8
+--EXPECTF--
+My 404 is rawesome
\ No newline at end of file
diff --git a/ext/phar/tests/cache_list/frontcontroller25.phpt b/ext/phar/tests/cache_list/frontcontroller25.phpt
new file mode 100644 (file)
index 0000000..a877939
--- /dev/null
@@ -0,0 +1,18 @@
+--TEST--
+Phar front controller with extra path_info [cache_list]
+--INI--
+default_charset=UTF-8
+phar.cache_list={PWD}/frontcontroller25.php
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--ENV--
+SCRIPT_NAME=/frontcontroller25.php
+REQUEST_URI=/frontcontroller25.php/a1.phps/extra/stuff
+PATH_INFO=/a1.phps/extra/stuff
+--FILE_EXTERNAL--
+files/frontcontroller8.phar
+--EXPECTHEADERS--
+Content-type: text/html; charset=UTF-8
+--EXPECTF--
+string(42) "/frontcontroller25.php/a1.phps/extra/stuff"
+string(12) "/extra/stuff"
\ No newline at end of file
diff --git a/ext/phar/tests/cache_list/frontcontroller26.phpt b/ext/phar/tests/cache_list/frontcontroller26.phpt
new file mode 100644 (file)
index 0000000..86a1c14
--- /dev/null
@@ -0,0 +1,16 @@
+--TEST--
+Phar front controller with unknown extension mime type [cache_list]
+--INI--
+phar.cache_list={PWD}/frontcontroller26.php
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--ENV--
+SCRIPT_NAME=/frontcontroller26.php
+REQUEST_URI=/frontcontroller26.php/unknown.ext
+PATH_INFO=/unknown.ext
+--FILE_EXTERNAL--
+files/frontcontroller8.phar
+--EXPECTHEADERS--
+Content-type: application/octet-stream
+--EXPECTF--
+<?php var_dump("hi");
\ No newline at end of file
diff --git a/ext/phar/tests/cache_list/frontcontroller27.phpt b/ext/phar/tests/cache_list/frontcontroller27.phpt
new file mode 100644 (file)
index 0000000..4a76e02
--- /dev/null
@@ -0,0 +1,17 @@
+--TEST--
+Phar front controller with no extension [cache_list]
+--INI--
+default_charset=UTF-8
+phar.cache_list={PWD}/frontcontroller27.php
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--ENV--
+SCRIPT_NAME=/frontcontroller27.php
+REQUEST_URI=/frontcontroller27.php/noext
+PATH_INFO=/noext
+--FILE_EXTERNAL--
+files/frontcontroller8.phar
+--EXPECTHEADERS--
+Content-type: text/plain;charset=UTF-8
+--EXPECTF--
+hi
\ No newline at end of file
diff --git a/ext/phar/tests/cache_list/frontcontroller28.phpt b/ext/phar/tests/cache_list/frontcontroller28.phpt
new file mode 100644 (file)
index 0000000..80059a9
--- /dev/null
@@ -0,0 +1,17 @@
+--TEST--
+Phar front controller with huge file [cache_list]
+--INI--
+default_charset=UTF-8
+phar.cache_list={PWD}/frontcontroller28.php
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die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aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
diff --git a/ext/phar/tests/cache_list/frontcontroller29.phpt b/ext/phar/tests/cache_list/frontcontroller29.phpt
new file mode 100644 (file)
index 0000000..1cd8f96
--- /dev/null
@@ -0,0 +1,17 @@
+--TEST--
+Phar front controller with fatal error in php file [cache_list]
+--INI--
+default_charset=UTF-8
+phar.cache_list={PWD}/frontcontroller29.php
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--ENV--
+SCRIPT_NAME=/frontcontroller29.php
+REQUEST_URI=/frontcontroller29.php/fatalerror.phps
+PATH_INFO=/fatalerror.phps
+--FILE_EXTERNAL--
+files/frontcontroller8.phar
+--EXPECTHEADERS--
+Content-type: text/html; charset=UTF-8
+--EXPECTF--
+Fatal error: Call to undefined function oopsie_daisy() in phar://%sfatalerror.phps on line 1
\ No newline at end of file
diff --git a/ext/phar/tests/cache_list/frontcontroller3.phpt b/ext/phar/tests/cache_list/frontcontroller3.phpt
new file mode 100644 (file)
index 0000000..1c1b479
--- /dev/null
@@ -0,0 +1,20 @@
+--TEST--
+Phar front controller phps [cache_list]
+--INI--
+default_charset=UTF-8
+phar.cache_list={PWD}/frontcontroller3.php
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--ENV--
+SCRIPT_NAME=/frontcontroller3.php
+REQUEST_URI=/frontcontroller3.php/a.phps
+PATH_INFO=/a.phps
+--FILE_EXTERNAL--
+files/frontcontroller.phar
+--EXPECTHEADERS--
+Content-type: text/html; charset=UTF-8
+--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>
diff --git a/ext/phar/tests/cache_list/frontcontroller30.phpt b/ext/phar/tests/cache_list/frontcontroller30.phpt
new file mode 100644 (file)
index 0000000..5a63da8
--- /dev/null
@@ -0,0 +1,14 @@
+--TEST--
+Phar front controller with weird SCRIPT_NAME [cache_list]
+--INI--
+phar.cache_list={PWD}/frontcontroller30.php
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--ENV--
+SCRIPT_NAME=/huh?
+REQUEST_URI=/huh?
+--FILE_EXTERNAL--
+files/frontcontroller8.phar
+--EXPECTF--
+oops did not run
+%a
\ No newline at end of file
diff --git a/ext/phar/tests/cache_list/frontcontroller31.phpt b/ext/phar/tests/cache_list/frontcontroller31.phpt
new file mode 100644 (file)
index 0000000..9ef1221
--- /dev/null
@@ -0,0 +1,16 @@
+--TEST--
+Phar front controller with invalid callback for rewrites [cache_list]
+--INI--
+default_charset=UTF-8
+phar.cache_list={PWD}/frontcontroller31.php
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--ENV--
+SCRIPT_NAME=/frontcontroller31.php
+REQUEST_URI=/frontcontroller31.php
+--EXPECTHEADERS--
+Content-type: text/html; charset=UTF-8
+--FILE_EXTERNAL--
+files/frontcontroller16.phar
+--EXPECT--
+phar error: invalid rewrite callback
\ No newline at end of file
diff --git a/ext/phar/tests/cache_list/frontcontroller32.phpt b/ext/phar/tests/cache_list/frontcontroller32.phpt
new file mode 100644 (file)
index 0000000..5911690
--- /dev/null
@@ -0,0 +1,16 @@
+--TEST--
+Phar front controller with valid callback that is not good [cache_list]
+--INI--
+default_charset=UTF-8
+phar.cache_list={PWD}/frontcontroller32.php
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--ENV--
+SCRIPT_NAME=/frontcontroller32.php
+REQUEST_URI=/frontcontroller32.php
+--EXPECTHEADERS--
+Content-type: text/html; charset=UTF-8
+--FILE_EXTERNAL--
+files/frontcontroller17.phar
+--EXPECTF--
+%ahar error: failed to call rewrite callback
\ No newline at end of file
diff --git a/ext/phar/tests/cache_list/frontcontroller33.phpt b/ext/phar/tests/cache_list/frontcontroller33.phpt
new file mode 100644 (file)
index 0000000..9573854
--- /dev/null
@@ -0,0 +1,16 @@
+--TEST--
+Phar front controller with valid callback that does not return any value [cache_list]
+--INI--
+default_charset=UTF-8
+phar.cache_list={PWD}/frontcontroller33.php
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--ENV--
+SCRIPT_NAME=/frontcontroller33.php
+REQUEST_URI=/frontcontroller33.php
+--EXPECTHEADERS--
+Content-type: text/html; charset=UTF-8
+--FILE_EXTERNAL--
+files/frontcontroller18.phar
+--EXPECTF--
+phar error: rewrite callback must return a string or false
\ No newline at end of file
diff --git a/ext/phar/tests/cache_list/frontcontroller34.phpt b/ext/phar/tests/cache_list/frontcontroller34.phpt
new file mode 100644 (file)
index 0000000..83c22f5
--- /dev/null
@@ -0,0 +1,19 @@
+--TEST--
+Phar front controller with cwd [cache_list]
+--INI--
+default_charset=UTF-8
+phar.cache_list={PWD}/frontcontroller34.php
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--ENV--
+SCRIPT_NAME=/frontcontroller34.php
+REQUEST_URI=/frontcontroller34.php/start/index.php
+PATH_INFO=/start/index.php
+--EXPECTHEADERS--
+Content-type: text/html; charset=UTF-8
+--FILE_EXTERNAL--
+files/frontcontroller19.phar
+--EXPECT--
+start/index.php
+start/another.php
+another.php
diff --git a/ext/phar/tests/cache_list/frontcontroller4.phpt b/ext/phar/tests/cache_list/frontcontroller4.phpt
new file mode 100644 (file)
index 0000000..5cf3682
--- /dev/null
@@ -0,0 +1,15 @@
+--TEST--
+Phar front controller index.php relocate (no /) [cache_list]
+--INI--
+phar.cache_list={PWD}/frontcontroller4.php
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--ENV--
+SCRIPT_NAME=/frontcontroller4.php
+REQUEST_URI=/frontcontroller4.php
+--FILE_EXTERNAL--
+files/frontcontroller.phar
+--EXPECTHEADERS--
+Status: 301 Moved Permanently
+Location: /frontcontroller4.php/index.php
+--EXPECT--
diff --git a/ext/phar/tests/cache_list/frontcontroller5.phpt b/ext/phar/tests/cache_list/frontcontroller5.phpt
new file mode 100644 (file)
index 0000000..2c738d7
--- /dev/null
@@ -0,0 +1,16 @@
+--TEST--
+Phar front controller index.php relocate [cache_list]
+--INI--
+phar.cache_list={PWD}/frontcontroller5.php
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--ENV--
+SCRIPT_NAME=/frontcontroller5.php
+REQUEST_URI=/frontcontroller5.php/
+PATH_INFO=/
+--FILE_EXTERNAL--
+files/frontcontroller.phar
+--EXPECTHEADERS--
+Status: 301 Moved Permanently
+Location: /frontcontroller5.php/index.php
+--EXPECT--
diff --git a/ext/phar/tests/cache_list/frontcontroller6.phpt b/ext/phar/tests/cache_list/frontcontroller6.phpt
new file mode 100644 (file)
index 0000000..2480be4
--- /dev/null
@@ -0,0 +1,23 @@
+--TEST--
+Phar front controller 404 [cache_list]
+--INI--
+phar.cache_list={PWD}/frontcontroller6.php
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--ENV--
+SCRIPT_NAME=/frontcontroller6.php
+REQUEST_URI=/frontcontroller6.php/notfound.php
+PATH_INFO=/notfound.php
+--FILE_EXTERNAL--
+files/frontcontroller.phar
+--EXPECTHEADERS--
+Status: 404 Not Found
+--EXPECT--
+<html>
+ <head>
+  <title>File Not Found</title>
+ </head>
+ <body>
+  <h1>404 - File /notfound.php Not Found</h1>
+ </body>
+</html>
\ No newline at end of file
diff --git a/ext/phar/tests/cache_list/frontcontroller7.phpt b/ext/phar/tests/cache_list/frontcontroller7.phpt
new file mode 100644 (file)
index 0000000..a8a88a9
--- /dev/null
@@ -0,0 +1,16 @@
+--TEST--
+Phar front controller alternate index file [cache_list]
+--INI--
+phar.cache_list={PWD}/frontcontroller7.php
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--ENV--
+SCRIPT_NAME=/frontcontroller7.php
+REQUEST_URI=/frontcontroller7.php/
+PATH_INFO=/
+--FILE_EXTERNAL--
+files/frontcontroller2.phar
+--EXPECTHEADERS--
+Status: 301 Moved Permanently
+Location: /frontcontroller7.php/a.php
+--EXPECT--
diff --git a/ext/phar/tests/cache_list/frontcontroller8.phpt b/ext/phar/tests/cache_list/frontcontroller8.phpt
new file mode 100644 (file)
index 0000000..bf9b390
--- /dev/null
@@ -0,0 +1,23 @@
+--TEST--
+Phar front controller no index file 404 [cache_list]
+--INI--
+phar.cache_list={PWD}/frontcontroller8.php
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--ENV--
+SCRIPT_NAME=/frontcontroller8.php
+REQUEST_URI=/frontcontroller8.php/
+PATH_INFO=/
+--FILE_EXTERNAL--
+files/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
diff --git a/ext/phar/tests/cache_list/frontcontroller9.phpt b/ext/phar/tests/cache_list/frontcontroller9.phpt
new file mode 100644 (file)
index 0000000..1a8b916
--- /dev/null
@@ -0,0 +1,20 @@
+--TEST--
+Phar front controller rewrite array [cache_list]
+--INI--
+default_charset=UTF-8
+phar.cache_list={PWD}/frontcontroller9.php
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--ENV--
+SCRIPT_NAME=/frontcontroller9.php
+REQUEST_URI=/frontcontroller9.php/hi
+PATH_INFO=/hi
+--FILE_EXTERNAL--
+files/frontcontroller3.phar
+--EXPECTHEADERS--
+Content-type: text/html; charset=UTF-8
+--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