From: Steph Fox Date: Fri, 1 Aug 2008 17:34:03 +0000 (+0000) Subject: - Somehow 'cvs add' managed to ignore these completely(?) X-Git-Tag: BEFORE_HEAD_NS_CHANGE~918 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=fa2f1c171bd20c8b330ef6fb4863dd01df43ec23;p=php - Somehow 'cvs add' managed to ignore these completely(?) --- diff --git a/ext/phar/tests/cache_list/files/frontcontroller.phar b/ext/phar/tests/cache_list/files/frontcontroller.phar new file mode 100644 index 0000000000..626bf48acf 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 index 0000000000..078ce75b2c 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 index 0000000000..61ea843222 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 index 0000000000..9e45587610 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 index 0000000000..750ff27a8e 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 index 0000000000..78a42a999f 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 index 0000000000..cce5db5bb5 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 index 0000000000..b83d41fd5b 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 index 0000000000..c447f397ac 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 index 0000000000..bdf8ee13c2 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 index 0000000000..0dd0e7f695 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 index 0000000000..afcf03af35 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 index 0000000000..4c9a92a197 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 index 0000000000..f206b5996d 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 index 0000000000..f4a8265b16 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 index 0000000000..07884b22bc 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 index 0000000000..ec05ceafb0 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 index 0000000000..39ca28c96c 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 index 0000000000..d0d5552f16 --- /dev/null +++ b/ext/phar/tests/cache_list/frontcontroller1.phpt @@ -0,0 +1,17 @@ +--TEST-- +Phar front controller other +--INI-- +phar.cache_list={PWD}/frontcontroller1.php [cache_list] +--SKIPIF-- + +--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 index 0000000000..00177d4ff5 --- /dev/null +++ b/ext/phar/tests/cache_list/frontcontroller10.phpt @@ -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-- + +--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-- + + + Access Denied + + +

403 - File /hi Access Denied

+ + diff --git a/ext/phar/tests/cache_list/frontcontroller11.phpt b/ext/phar/tests/cache_list/frontcontroller11.phpt new file mode 100644 index 0000000000..25b147e194 --- /dev/null +++ b/ext/phar/tests/cache_list/frontcontroller11.phpt @@ -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-- + + +--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 index 0000000000..cfc7d0e43a --- /dev/null +++ b/ext/phar/tests/cache_list/frontcontroller12.phpt @@ -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-- + +--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 index 0000000000..e6c9dee4ae --- /dev/null +++ b/ext/phar/tests/cache_list/frontcontroller13.phpt @@ -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-- + +--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 index 0000000000..bbd9637d24 --- /dev/null +++ b/ext/phar/tests/cache_list/frontcontroller14.phpt @@ -0,0 +1,17 @@ +--TEST-- +Phar front controller mime type override, other [cache_list] +--INI-- +phar.cache_list={PWD}/frontcontroller14.php +--SKIPIF-- + +--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 index 0000000000..d142a5d742 --- /dev/null +++ b/ext/phar/tests/cache_list/frontcontroller15.phpt @@ -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-- + +--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-- + +<?php function hio(){} + + + diff --git a/ext/phar/tests/cache_list/frontcontroller16.phpt b/ext/phar/tests/cache_list/frontcontroller16.phpt new file mode 100644 index 0000000000..10bebdccef --- /dev/null +++ b/ext/phar/tests/cache_list/frontcontroller16.phpt @@ -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-- + +--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 index 0000000000..35d3ae4e9c --- /dev/null +++ b/ext/phar/tests/cache_list/frontcontroller17.phpt @@ -0,0 +1,18 @@ +--TEST-- +Phar front controller mime type unknown [cache_list] +--INI-- +phar.cache_list={PWD}/frontcontroller17.php +--SKIPIF-- + +--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 index 0000000000..5e94bf6ff5 --- /dev/null +++ b/ext/phar/tests/cache_list/frontcontroller18.phpt @@ -0,0 +1,18 @@ +--TEST-- +Phar front controller $_SERVER munging failure [cache_list] +--INI-- +phar.cache_list={PWD}/frontcontroller18.php +--SKIPIF-- + +--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 index 0000000000..bed0b1df31 --- /dev/null +++ b/ext/phar/tests/cache_list/frontcontroller19.phpt @@ -0,0 +1,18 @@ +--TEST-- +Phar front controller $_SERVER munging failure 2 [cache_list] +--INI-- +phar.cache_list={PWD}/frontcontroller19.php +--SKIPIF-- + +--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 index 0000000000..67ccfc1e04 --- /dev/null +++ b/ext/phar/tests/cache_list/frontcontroller2.phpt @@ -0,0 +1,17 @@ +--TEST-- +Phar front controller PHP test [cache_list] +--INI-- +default_charset=UTF-8 +phar.cache_list=frontcontroller2.php +--SKIPIF-- + +--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 index 0000000000..bf333c773c --- /dev/null +++ b/ext/phar/tests/cache_list/frontcontroller20.phpt @@ -0,0 +1,18 @@ +--TEST-- +Phar front controller $_SERVER munging failure 3 [cache_list] +--INI-- +phar.cache_list={PWD}/frontcontroller20.php +--SKIPIF-- + +--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 index 0000000000..9ed315d19e --- /dev/null +++ b/ext/phar/tests/cache_list/frontcontroller21.phpt @@ -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-- + +--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 index 0000000000..82a8389ad5 --- /dev/null +++ b/ext/phar/tests/cache_list/frontcontroller22.phpt @@ -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-- + +--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 index 0000000000..3da9631dfb --- /dev/null +++ b/ext/phar/tests/cache_list/frontcontroller23.phpt @@ -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-- + +--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 index 0000000000..561826bd78 --- /dev/null +++ b/ext/phar/tests/cache_list/frontcontroller24.phpt @@ -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-- + +--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 index 0000000000..a8779392b6 --- /dev/null +++ b/ext/phar/tests/cache_list/frontcontroller25.phpt @@ -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-- + +--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 index 0000000000..86a1c1444c --- /dev/null +++ b/ext/phar/tests/cache_list/frontcontroller26.phpt @@ -0,0 +1,16 @@ +--TEST-- +Phar front controller with unknown extension mime type [cache_list] +--INI-- +phar.cache_list={PWD}/frontcontroller26.php +--SKIPIF-- + +--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-- + +--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 index 0000000000..80059a9da2 --- /dev/null +++ b/ext/phar/tests/cache_list/frontcontroller28.phpt @@ -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-- + +--ENV-- +SCRIPT_NAME=/frontcontroller28.php +REQUEST_URI=/frontcontroller28.php/bigfile.txt +PATH_INFO=/bigfile.txt +--FILE_EXTERNAL-- +files/frontcontroller8.phar +--EXPECTHEADERS-- +Content-type: text/plain;charset=UTF-8 +--EXPECT-- +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa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aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa diff --git a/ext/phar/tests/cache_list/frontcontroller29.phpt b/ext/phar/tests/cache_list/frontcontroller29.phpt new file mode 100644 index 0000000000..1cd8f96f2d --- /dev/null +++ b/ext/phar/tests/cache_list/frontcontroller29.phpt @@ -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-- + +--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 index 0000000000..1c1b479881 --- /dev/null +++ b/ext/phar/tests/cache_list/frontcontroller3.phpt @@ -0,0 +1,20 @@ +--TEST-- +Phar front controller phps [cache_list] +--INI-- +default_charset=UTF-8 +phar.cache_list={PWD}/frontcontroller3.php +--SKIPIF-- + +--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-- + +<?php function hio(){} + + diff --git a/ext/phar/tests/cache_list/frontcontroller30.phpt b/ext/phar/tests/cache_list/frontcontroller30.phpt new file mode 100644 index 0000000000..5a63da874c --- /dev/null +++ b/ext/phar/tests/cache_list/frontcontroller30.phpt @@ -0,0 +1,14 @@ +--TEST-- +Phar front controller with weird SCRIPT_NAME [cache_list] +--INI-- +phar.cache_list={PWD}/frontcontroller30.php +--SKIPIF-- + +--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 index 0000000000..9ef1221a28 --- /dev/null +++ b/ext/phar/tests/cache_list/frontcontroller31.phpt @@ -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-- + +--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 index 0000000000..59116907a5 --- /dev/null +++ b/ext/phar/tests/cache_list/frontcontroller32.phpt @@ -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-- + +--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 index 0000000000..9573854823 --- /dev/null +++ b/ext/phar/tests/cache_list/frontcontroller33.phpt @@ -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-- + +--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 index 0000000000..83c22f58f8 --- /dev/null +++ b/ext/phar/tests/cache_list/frontcontroller34.phpt @@ -0,0 +1,19 @@ +--TEST-- +Phar front controller with cwd [cache_list] +--INI-- +default_charset=UTF-8 +phar.cache_list={PWD}/frontcontroller34.php +--SKIPIF-- + +--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 index 0000000000..5cf3682277 --- /dev/null +++ b/ext/phar/tests/cache_list/frontcontroller4.phpt @@ -0,0 +1,15 @@ +--TEST-- +Phar front controller index.php relocate (no /) [cache_list] +--INI-- +phar.cache_list={PWD}/frontcontroller4.php +--SKIPIF-- + +--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 index 0000000000..2c738d7bfb --- /dev/null +++ b/ext/phar/tests/cache_list/frontcontroller5.phpt @@ -0,0 +1,16 @@ +--TEST-- +Phar front controller index.php relocate [cache_list] +--INI-- +phar.cache_list={PWD}/frontcontroller5.php +--SKIPIF-- + +--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 index 0000000000..2480be4129 --- /dev/null +++ b/ext/phar/tests/cache_list/frontcontroller6.phpt @@ -0,0 +1,23 @@ +--TEST-- +Phar front controller 404 [cache_list] +--INI-- +phar.cache_list={PWD}/frontcontroller6.php +--SKIPIF-- + +--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-- + + + File Not Found + + +

404 - File /notfound.php Not Found

+ + \ 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 index 0000000000..a8a88a95fe --- /dev/null +++ b/ext/phar/tests/cache_list/frontcontroller7.phpt @@ -0,0 +1,16 @@ +--TEST-- +Phar front controller alternate index file [cache_list] +--INI-- +phar.cache_list={PWD}/frontcontroller7.php +--SKIPIF-- + +--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 index 0000000000..bf9b390def --- /dev/null +++ b/ext/phar/tests/cache_list/frontcontroller8.phpt @@ -0,0 +1,23 @@ +--TEST-- +Phar front controller no index file 404 [cache_list] +--INI-- +phar.cache_list={PWD}/frontcontroller8.php +--SKIPIF-- + +--ENV-- +SCRIPT_NAME=/frontcontroller8.php +REQUEST_URI=/frontcontroller8.php/ +PATH_INFO=/ +--FILE_EXTERNAL-- +files/frontcontroller3.phar +--EXPECTHEADERS-- +Status: 404 Not Found +--EXPECT-- + + + File Not Found + + +

404 - File /index.php Not Found

+ + \ 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 index 0000000000..1a8b9168cc --- /dev/null +++ b/ext/phar/tests/cache_list/frontcontroller9.phpt @@ -0,0 +1,20 @@ +--TEST-- +Phar front controller rewrite array [cache_list] +--INI-- +default_charset=UTF-8 +phar.cache_list={PWD}/frontcontroller9.php +--SKIPIF-- + +--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-- + +<?php function hio(){} + + \ No newline at end of file