php-src/ext/phar/tests
Greg Beaver 8e4cc4b3dd first attempt at major new feature: default front controller for web
Currently, an entire phar entry is leaked for no obvious reason, otherwise it works.  Sample code:
The phar has to be created using Phar->useFrontController(); and the stub performs actual resolution of which file to load:
<?php
Phar::mapPhar();
include 'phar://' . __FILE__ . '/' . substr($_SERVER['REQUEST_URI'], strlen(basename(__FILE__)));
__HALT_COMPILER();
?>

Phar automatically determines mime type from the file extension and either parses or displays the file.  Modification of REQUEST_URI
and other variables should happen in the stub
[DOC]
2007-12-22 07:46:53 +00:00
..
001.phpt first attempt at major new feature: default front controller for web 2007-12-22 07:46:53 +00:00
002.phpt - Fix test 2007-05-29 09:13:57 +00:00
003.phpt - Add bzip2 decompression support 2006-01-12 21:16:29 +00:00
003a.phpt - Add new test 2007-02-07 08:36:50 +00:00
004.phpt throw exceptions from Phar object, and errors from stream wrapper 2007-01-29 06:02:19 +00:00
005.phpt - For errors "internal corruption of phar ... (truncated manifest)" be more 2007-05-27 15:47:52 +00:00
006.phpt - For errors "internal corruption of phar ... (truncated manifest)" be more 2007-05-27 15:47:52 +00:00
007.phpt throw exceptions from Phar object, and errors from stream wrapper 2007-01-29 06:02:19 +00:00
008.phpt - For errors "internal corruption of phar ... (truncated manifest)" be more 2007-05-27 15:47:52 +00:00
009.phpt throw exceptions from Phar object, and errors from stream wrapper 2007-01-29 06:02:19 +00:00
010.phpt throw exceptions from Phar object, and errors from stream wrapper 2007-01-29 06:02:19 +00:00
011.phpt throw exceptions from Phar object, and errors from stream wrapper 2007-01-29 06:02:19 +00:00
012.phpt - Change to new layout wich has some more flags that will be used for perms 2007-01-13 16:17:04 +00:00
013.phpt - Don't be to picky, as long as we get an error here, we're fine 2007-01-22 02:24:40 +00:00
014.phpt - Update tests 2007-01-21 16:58:23 +00:00
015.phpt - Update tests 2007-01-21 16:58:23 +00:00
015b.phpt - Fix test 2007-01-27 23:11:45 +00:00
016.phpt implement phar refcounting 2007-01-26 14:52:10 +00:00
016b.phpt fix tests, fix corruption issues with compression, simplify code. 3 tests still fail, memory leaks and mysterious crc error - the 16 tests are faulty 2007-01-22 03:41:41 +00:00
017.phpt fix mem leak on error, fix cwd issue. go back to BadMethodCallException for Phar->set*CompressedAllFiles(). ALL TESTS PASS, RELEASE IS IMMINENT 2007-02-03 04:04:18 +00:00
018.phpt - Update tests 2007-01-21 16:58:23 +00:00
019.phpt - Change to new layout wich has some more flags that will be used for perms 2007-01-13 16:17:04 +00:00
019b.phpt - Change to new layout wich has some more flags that will be used for perms 2007-01-13 16:17:04 +00:00
019c.phpt - Change to new layout wich has some more flags that will be used for perms 2007-01-13 16:17:04 +00:00
020.phpt fix ini tests EXPECT 2007-01-20 23:12:28 +00:00
021.phpt fix ini tests EXPECT 2007-01-20 23:12:28 +00:00
022.phpt - Change to new layout wich has some more flags that will be used for perms 2007-01-13 16:17:04 +00:00
023.phpt - Change to new layout wich has some more flags that will be used for perms 2007-01-13 16:17:04 +00:00
024.phpt - Change to new layout wich has some more flags that will be used for perms 2007-01-13 16:17:04 +00:00
025.phpt - Change to new layout wich has some more flags that will be used for perms 2007-01-13 16:17:04 +00:00
026.phpt fix test 2007-12-14 18:37:49 +00:00
027.phpt fix test 2007-12-14 05:22:53 +00:00
028.phpt - Change to new layout wich has some more flags that will be used for perms 2007-01-13 16:17:04 +00:00
029.phpt - CS & Fix expectations 2007-01-29 22:21:48 +00:00
030.phpt fix test 2007-12-14 05:22:53 +00:00
031.phpt fix test 2007-12-14 05:22:53 +00:00
032.phpt throw exceptions from Phar object, and errors from stream wrapper 2007-01-29 06:02:19 +00:00
033.phpt fix several potential segfaults, add tests for chmod(), fix chmod() 2007-02-06 17:09:37 +00:00
033a.phpt - Fix test 2007-02-06 20:14:26 +00:00
create_new_and_modify.phpt implement phar refcounting 2007-01-26 14:52:10 +00:00
create_new_phar_b.phpt - Fix read/write mode handling 2007-01-28 10:32:45 +00:00
create_new_phar_c.phpt - Add general SHA-2 support by optional pecl/hash dependency 2007-03-25 21:43:49 +00:00
create_new_phar.phpt - Add initial hash support write/read/verify md5/sha1(default) 2007-01-08 23:03:41 +00:00
create_path_error.phpt first attempt at major new feature: default front controller for web 2007-12-22 07:46:53 +00:00
delete_in_phar_b.phpt - Change to new layout wich has some more flags that will be used for perms 2007-01-13 16:17:04 +00:00
delete_in_phar_confirm.phpt - Fix error expectations 2007-01-14 18:57:22 +00:00
delete_in_phar.phpt - Fix error expectations 2007-01-14 18:57:22 +00:00
delete.phpt move to 1.3.0 development 2007-08-25 01:32:35 +00:00
extracted_001.phpt fix test 2007-12-14 18:54:54 +00:00
extracted.inc - Add ini: phar.extract_list 2007-03-25 19:03:38 +00:00
ini_set_off.phpt - Fix Phar::canWrite(), had inverted logic 2007-05-09 18:09:41 +00:00
ini_set.phpt - Test naming 2007-01-28 10:34:58 +00:00
md5.phar add helper phars for test 2007-11-25 05:25:04 +00:00
metadata_read.phpt - Rewrite/Finish metadata handling 2007-01-21 20:12:50 +00:00
metadata_write_commit.phpt - This test needs to write 2007-05-20 18:34:17 +00:00
metadata_write.phpt - Rewrite/Finish metadata handling 2007-01-21 20:12:50 +00:00
open_for_write_existing_b.phpt - Fix read/write mode handling 2007-01-28 10:32:45 +00:00
open_for_write_existing_c.phpt - Fix read/write mode handling 2007-01-28 10:32:45 +00:00
open_for_write_existing.phpt - Change to new layout wich has some more flags that will be used for perms 2007-01-13 16:17:04 +00:00
open_for_write_newfile_b.phpt - Fix read/write mode handling 2007-01-28 10:32:45 +00:00
open_for_write_newfile_c.phpt - Fix read/write mode handling 2007-01-28 10:32:45 +00:00
open_for_write_newfile.phpt - Change to new layout wich has some more flags that will be used for perms 2007-01-13 16:17:04 +00:00
phar_begin_setstub_commit.phpt - Verify stub 2007-05-27 16:54:37 +00:00
phar_buildfromiterator1.phpt Phar->buildFromIterator: use spl_iterator_apply(), add 4 tests (mem leaks not yet fixed in the 4th) 2007-12-13 00:54:15 +00:00
phar_buildfromiterator2.phpt Phar->buildFromIterator: use spl_iterator_apply(), add 4 tests (mem leaks not yet fixed in the 4th) 2007-12-13 00:54:15 +00:00
phar_buildfromiterator3.phpt Phar->buildFromIterator: use spl_iterator_apply(), add 4 tests (mem leaks not yet fixed in the 4th) 2007-12-13 00:54:15 +00:00
phar_buildfromiterator4.phpt fix test, new test 2007-12-13 01:12:10 +00:00
phar_buildfromiterator5.phpt fix test, new test 2007-12-13 01:12:10 +00:00
phar_buildfromiterator6.phpt new test 2007-12-13 01:14:13 +00:00
phar_buildfromiterator7.phpt new test 2007-12-13 01:20:25 +00:00
phar_buildfromiterator8.phpt fix test 2007-12-14 18:54:54 +00:00
phar_buildfromiterator9.phpt Phar->buildFromIterator now can also accept a stream handle as a value in addition 2007-12-14 19:45:22 +00:00
phar_commitwrite.phpt - Verify stub 2007-05-27 16:54:37 +00:00
phar_copy.phpt fully implement Phar->copy(), fix test 2007-12-16 06:31:00 +00:00
phar_create_in_cwd.phpt MFB fix to test 2007-11-25 04:48:14 +00:00
phar_ctx_001.phpt stream context for specifying meta-data 2007-01-28 03:25:53 +00:00
phar_dir_iterate.phpt fix test 2007-12-14 05:22:53 +00:00
phar_get_supportedcomp1.phpt add new tests for Phar::getSupportedCompression 2007-11-25 04:43:01 +00:00
phar_get_supportedcomp2.phpt fix test expected output 2007-11-25 04:49:53 +00:00
phar_get_supportedcomp3.phpt fix test expected output 2007-11-25 04:49:53 +00:00
phar_get_supportedcomp4.phpt add new tests for Phar::getSupportedCompression 2007-11-25 04:43:01 +00:00
phar_get_suppoted_signatures_001.phpt - Add general SHA-2 support by optional pecl/hash dependency 2007-03-25 21:43:49 +00:00
phar_get_suppoted_signatures_002.phpt - Add general SHA-2 support by optional pecl/hash dependency 2007-03-25 21:43:49 +00:00
phar_magic.phpt on second thought, hooking into getcwd() is a bad idea, who uses this for code loading, anyways? 2007-12-21 04:49:25 +00:00
phar_metadata_read.phpt fix errors found in delMetaData(), add get/delMetaData() to MetaData read test 2007-11-25 05:04:40 +00:00
phar_metadata_write.phpt implement Phar->getMetadata() Phar->setMetadata(), add tests, implement meta-data in the header 2007-01-29 03:59:55 +00:00
phar_offset_get_error.phpt improve error message empty entry => empty directory. Add check for phar://blah.phar/. and phar://blah.phar/.. 2007-02-05 07:19:35 +00:00
phar_oo_001.phpt implement Phar->getMetadata() Phar->setMetadata(), add tests, implement meta-data in the header 2007-01-29 03:59:55 +00:00
phar_oo_002.phpt fix test 2007-12-14 18:54:54 +00:00
phar_oo_003.phpt - Disable most of class Phar and all of class PharFileInfo if SPL is not present 2007-01-21 15:25:50 +00:00
phar_oo_004.phpt - Disable most of class Phar and all of class PharFileInfo if SPL is not present 2007-01-21 15:25:50 +00:00
phar_oo_005.phpt fix test 2007-12-14 18:54:54 +00:00
phar_oo_006.phpt - Per defautl class Phar returns Info class on offsetGet() 2007-01-21 17:40:27 +00:00
phar_oo_007.phpt fix test 2007-12-14 05:22:53 +00:00
phar_oo_008.phpt - Per defautl class Phar returns Info class on offsetGet() 2007-01-21 17:40:27 +00:00
phar_oo_009.phpt - Per defautl class Phar returns Info class on offsetGet() 2007-01-21 17:40:27 +00:00
phar_oo_010.phpt - Disable most of class Phar and all of class PharFileInfo if SPL is not present 2007-01-21 15:25:50 +00:00
phar_oo_011.phpt - Per defautl class Phar returns Info class on offsetGet() 2007-01-21 17:40:27 +00:00
phar_oo_011b.phpt - Disable most of class Phar and all of class PharFileInfo if SPL is not present 2007-01-21 15:25:50 +00:00
phar_oo_012_confirm.phpt - Per defautl class Phar returns Info class on offsetGet() 2007-01-21 17:40:27 +00:00
phar_oo_012.phpt - Per defautl class Phar returns Info class on offsetGet() 2007-01-21 17:40:27 +00:00
phar_oo_012b.phpt - Per defautl class Phar returns Info class on offsetGet() 2007-01-21 17:40:27 +00:00
phar_oo_compressallbz2.phpt fix uncompressAllFiles() and compressAllFilesBZIP2(), add tests 2007-01-27 19:37:17 +00:00
phar_oo_compressallgz.phpt fix uncompressAllFiles() and compressAllFilesBZIP2(), add tests 2007-01-27 19:37:17 +00:00
phar_oo_compressed_001.phpt - context not needed here 2007-01-27 17:27:09 +00:00
phar_oo_compressed_001b.phpt - context not needed here 2007-01-27 17:27:09 +00:00
phar_oo_compressed_002.phpt fix memleaks and all but 1 test 2007-01-27 18:45:48 +00:00
phar_oo_compressed_002b.phpt - Add missing INI setting 2007-01-27 19:17:56 +00:00
phar_oo_getmodified.phpt new test for Phar::getModified() 2007-11-25 04:54:36 +00:00
phar_oo_nosig.phpt new test for no signature 2007-11-25 04:52:49 +00:00
phar_oo_test.inc - Change to new layout wich has some more flags that will be used for perms 2007-01-13 16:17:04 +00:00
phar_oo_uncompressall.phpt fix uncompressAllFiles() and compressAllFilesBZIP2(), add tests 2007-01-27 19:37:17 +00:00
phar_setalias2.phpt add test for pre-existing alias failure, fix source to fail if alias already exists 2007-08-23 23:23:26 +00:00
phar_setalias.phpt implement Phar->setAlias() 2007-08-23 04:49:39 +00:00
phar_setsignaturealgo1.phpt fix tests, add missing break to setSignatureAlgorithm() 2007-03-26 00:29:22 +00:00
phar_setsignaturealgo2.phpt fix tests, add missing break to setSignatureAlgorithm() 2007-03-26 00:29:22 +00:00
phar_stub_error.phpt rename begin/isFlushingToPhar/commit to startBuffering/isBuffering/stopBuffering 2007-03-22 16:31:46 +00:00
phar_stub_write_file.phpt fix test in 5.3+ 2007-12-11 19:19:47 +00:00
phar_stub_write.phpt - Verify stub 2007-05-27 16:54:37 +00:00
phar_stub.phpt - Split commit into commit and setStub 2007-01-28 22:11:28 +00:00
phar_test.inc first attempt at major new feature: default front controller for web 2007-12-22 07:46:53 +00:00
refcount1_5_2.phpt - fix tests 2007-11-06 14:47:11 +00:00
refcount1.phpt - fix more variable stuff 2007-11-06 14:49:15 +00:00
rename.phpt add rename support 2007-01-28 22:43:38 +00:00
sha1.phar add helper phars for test 2007-11-25 05:25:04 +00:00
sha256.phar add helper phars for test 2007-11-25 05:25:04 +00:00
sha512.phar add helper phars for test 2007-11-25 05:25:04 +00:00
test_signaturealgos.phpt new test to verify signature algo parsing works 2007-11-25 05:24:50 +00:00