]> granicus.if.org Git - php/commitdiff
update tests to new API (16, 18, 19 still fail)
authorGreg Beaver <cellog@php.net>
Sun, 1 Jan 2006 21:43:14 +0000 (21:43 +0000)
committerGreg Beaver <cellog@php.net>
Sun, 1 Jan 2006 21:43:14 +0000 (21:43 +0000)
13 files changed:
ext/phar/tests/001.phpt
ext/phar/tests/002.phpt
ext/phar/tests/012.phpt
ext/phar/tests/013.phpt
ext/phar/tests/014.phpt
ext/phar/tests/015.phpt
ext/phar/tests/016.phpt
ext/phar/tests/017.phpt
ext/phar/tests/018.phpt
ext/phar/tests/019.phpt
ext/phar/tests/020.phpt
ext/phar/tests/021.phpt
ext/phar/tests/022.phpt

index b4240938851d77f207a689eaa8aa01f631980cfe..8a18e3ffdb2fddc8945bf6c6dc7a6ce7a6649e7c 100644 (file)
@@ -7,4 +7,4 @@ PHP_Archive::apiVersion
 echo PHP_Archive::apiVersion();
 ?>
 --EXPECT--
-0.7
\ No newline at end of file
+0.7.1
\ No newline at end of file
index 703dcff23c981a4ae6fcae62e6c034aa669081eb..0b79d19f4935a889cc1160abc8c199fe50198e89 100644 (file)
@@ -9,15 +9,10 @@ PHP_Archive::mapPhar(5);
 PHP_Archive::mapPhar(5, 5);
 PHP_Archive::mapPhar(5, 'hio');
 PHP_Archive::mapPhar(5, 'hio', 'hi');
-PHP_Archive::mapPhar(5, 'hio', true, 5, 5);
 __HALT_COMPILER(); ?>
 --EXPECTF--
-Warning: PHP_Archive::mapPhar() expects at least 3 parameters, 0 given in %s on line %d
+Warning: PHP_Archive::mapPhar() expects at least 2 parameters, 0 given in %s on line %d
 
-Warning: PHP_Archive::mapPhar() expects at least 3 parameters, 1 given in %s on line %d
-
-Warning: PHP_Archive::mapPhar() expects at least 3 parameters, 2 given in %s on line %d
-
-Warning: PHP_Archive::mapPhar() expects at least 3 parameters, 2 given in %s on line %d
+Warning: PHP_Archive::mapPhar() expects at least 2 parameters, 1 given in %s on line %d
 
 Fatal error: PHP_Archive::mapPhar(): internal corruption of phar "%s" (truncated manifest) in %s on line %d
\ No newline at end of file
index 71f624f6804cdbf6d0a82866e2b1233cc1a6a2d7..e605415c80133c529bf0511d6dd132e033095712 100644 (file)
@@ -7,7 +7,7 @@ PHP_Archive::mapPhar valid file
 function cleanup() { unlink(dirname(__FILE__) . '/008_phar.php'); }
 register_shutdown_function('cleanup');
 $file = "<?php
-PHP_Archive::mapPhar(5, 'hio', false);
+PHP_Archive::mapPhar('hio', false);
 __HALT_COMPILER(); ?>";
 $manifest = pack('V', 1) . 'a' . pack('VVVV', 1, time(), 0, 9);
 $file .= pack('VV', strlen($manifest) + 4, 1) . $manifest . pack('VV', crc32('a'), 1) . 'a';
index 9c97cd08a4690c36282157e05e22c174eb49b24b..d6b442c8686d4bde3163569b6b08618f5b8c3173 100644 (file)
@@ -7,7 +7,7 @@ PHP_Archive::mapPhar filesize mismatch
 function cleanup() { unlink(dirname(__FILE__) . '/008_phar.php'); }
 register_shutdown_function('cleanup');
 $file = "<?php
-PHP_Archive::mapPhar(5, 'hio', false);
+PHP_Archive::mapPhar('hio', false);
 __HALT_COMPILER(); ?>";
 // filesize should be 1, and is 2
 $manifest = pack('V', 1) . 'a' . pack('VVVV', 1, time(), 0, 9);
index 0959a66df74d40b62f5231d44351f4de365e0347..3cfb37703878225170a3a458e0461fe1b673a6de 100644 (file)
@@ -7,7 +7,7 @@ PHP_Archive::mapPhar filesize mismatch
 function cleanup() { unlink(dirname(__FILE__) . '/008_phar.php'); }
 register_shutdown_function('cleanup');
 $file = "<?php
-PHP_Archive::mapPhar(5, 'hio', false);
+PHP_Archive::mapPhar('hio', false);
 __HALT_COMPILER(); ?>";
 // wrong crc32
 $manifest = pack('V', 1) . 'a' . pack('VVVV', 1, time(), 0, 9);
index 47d9d50ba4eddeedfb31c29cd2c3058ac755a9d9..81aad086bf24169d1eb8b26fd7e37ada3010c73f 100644 (file)
@@ -8,7 +8,7 @@ if (!PHP_Archive::canCompress()) print "skip"; ?>
 function cleanup() { unlink(dirname(__FILE__) . '/008_phar.php'); }
 register_shutdown_function('cleanup');
 $file = "<?php
-PHP_Archive::mapPhar(5, 'hio', true);
+PHP_Archive::mapPhar('hio', true);
 __HALT_COMPILER(); ?>";
 $manifest = pack('V', 1) . 'a' . pack('VVVV', 1, time(), 0, 11);
 $file .= pack('VV', strlen($manifest) + 4, 1) . $manifest . pack('VV', crc32('a'), 1) . chr(75) . chr(4) . chr(0); // 'a' gzdeflated
index b92ef501c6f0c30a74c5f26749cf42d6c541e39d..7a51bbe23f20f7ed715b034107d14aeb72eb8943 100644 (file)
@@ -8,7 +8,7 @@ if (!PHP_Archive::canCompress()) print "skip"; ?>
 function cleanup() { unlink(dirname(__FILE__) . '/008_phar.php'); }
 register_shutdown_function('cleanup');
 $file = "<?php
-PHP_Archive::mapPhar(5, 'hio', true);
+PHP_Archive::mapPhar('hio', true);
 __HALT_COMPILER(); ?>";
 // file length is too short
 $manifest = pack('V', 1) . 'a' . pack('VVVV', 1, time(), 0, 9);
index 52b477c762fcd78ed17dd8eeeec2932812ab3b38..8d0387bcdc0f75a970530655c3e7be75d307b290 100644 (file)
@@ -7,7 +7,7 @@ opendir test - no dir specified at all
 function cleanup() { unlink(dirname(__FILE__) . '/008_phar.php'); }
 register_shutdown_function('cleanup');
 $file = "<?php
-PHP_Archive::mapPhar(5, 'hio', true);
+PHP_Archive::mapPhar('hio', true);
 __HALT_COMPILER(); ?>";
 // file length is too short
 $manifest = pack('V', 1) . 'a' . pack('VVVV', 1, time(), 0, 9);
index be5eb8bf92a0e63cc27e4dda3c18acffd6bf8377..3f860bfeb47db2f9377bc8d326b2eb1a77d65ce2 100644 (file)
@@ -7,7 +7,7 @@ opendir test, root directory
 function cleanup() { unlink(dirname(__FILE__) . '/008_phar.php'); }
 register_shutdown_function('cleanup');
 $file = "<?php
-PHP_Archive::mapPhar(5, 'hio', true);
+PHP_Archive::mapPhar('hio', true);
 __HALT_COMPILER(); ?>";
 $manifest = '';
 $manifest .= pack('V', 1) . 'a' . pack('VVVV', 1, time(), 0, 9);
index ce2f599ae89ad4c44bb2897964bc74d923e87a4d..970de7bfcbf9862e1581225c457fdc3384e12059 100644 (file)
@@ -7,7 +7,7 @@ opendir test, subdirectory
 function cleanup() { unlink(dirname(__FILE__) . '/008_phar.php'); }
 register_shutdown_function('cleanup');
 $file = "<?php
-PHP_Archive::mapPhar(5, 'hio', true);
+PHP_Archive::mapPhar('hio', true);
 __HALT_COMPILER(); ?>";
 $manifest = '';
 $manifest .= pack('V', 1) . 'a' . pack('VVVV', 1, time(), 0, 9);
index 53bf17a4f15a8961d268b43e50d917bbffb08fc6..31ceababce5356c381c416d88894d7ab955569ce 100644 (file)
@@ -7,7 +7,7 @@ url stat
 function cleanup() { unlink(dirname(__FILE__) . '/008_phar.php'); }
 register_shutdown_function('cleanup');
 $file = "<?php
-PHP_Archive::mapPhar(5, 'hio', false);
+PHP_Archive::mapPhar('hio', false);
 __HALT_COMPILER(); ?>";
 $manifest = '';
 $manifest .= pack('V', 1) . 'a' . pack('VVVV', 1, time(), 0, 9);
@@ -27,9 +27,9 @@ var_dump(stat('phar://hio/a'), stat('phar://hio/b'));
 --EXPECTF--
 array(26) {
   [0]=>
-  int(0)
+  int(12)
   [1]=>
-  int(0)
+  int(2090329158)
   [2]=>
   int(33060)
   [3]=>
@@ -53,9 +53,9 @@ array(26) {
   [12]=>
   int(-1)
   ["dev"]=>
-  int(0)
+  int(12)
   ["ino"]=>
-  int(0)
+  int(2090329158)
   ["mode"]=>
   int(33060)
   ["nlink"]=>
@@ -81,9 +81,9 @@ array(26) {
 }
 array(26) {
   [0]=>
-  int(0)
+  int(12)
   [1]=>
-  int(0)
+  int(2090329108)
   [2]=>
   int(16676)
   [3]=>
@@ -107,9 +107,9 @@ array(26) {
   [12]=>
   int(-1)
   ["dev"]=>
-  int(0)
+  int(12)
   ["ino"]=>
-  int(0)
+  int(2090329108)
   ["mode"]=>
   int(16676)
   ["nlink"]=>
index a571b1ee288ffd82a1057224dfc4c8987b690934..21f02034a4c32597e7aae2b37efd43baa046815c 100644 (file)
@@ -7,7 +7,7 @@ stream stat
 function cleanup() { unlink(dirname(__FILE__) . '/008_phar.php'); }
 register_shutdown_function('cleanup');
 $file = "<?php
-PHP_Archive::mapPhar(5, 'hio', false);
+PHP_Archive::mapPhar('hio', false);
 __HALT_COMPILER(); ?>";
 $manifest = '';
 $manifest .= pack('V', 1) . 'a' . pack('VVVV', 1, time(), 0, 9);
@@ -29,9 +29,9 @@ fclose($fp);
 --EXPECTF--
 array(26) {
   [0]=>
-  int(0)
+  int(12)
   [1]=>
-  int(0)
+  int(2090329158)
   [2]=>
   int(33060)
   [3]=>
@@ -55,9 +55,9 @@ array(26) {
   [12]=>
   int(-1)
   ["dev"]=>
-  int(0)
+  int(12)
   ["ino"]=>
-  int(0)
+  int(2090329158)
   ["mode"]=>
   int(33060)
   ["nlink"]=>
index 95a6fd8d2d5990420c98b2a51fc92bc97b9bdd9e..f95c67eb2bd4a2bdef030cc06036ba1d6a234fcf 100644 (file)
@@ -7,7 +7,7 @@ stream stat
 function cleanup() { unlink(dirname(__FILE__) . '/008_phar.php'); }
 register_shutdown_function('cleanup');
 $file = "<?php
-PHP_Archive::mapPhar(5, 'hio', false);
+PHP_Archive::mapPhar('hio', false);
 __HALT_COMPILER(); ?>";
 $contents = 'abcdefg';
 $manifest = pack('V', 1) . 'a' . pack('VVVV', strlen($contents), time(), 0, 8 + strlen($contents));