]> granicus.if.org Git - php/commitdiff
update test to work in php 6
authorGreg Beaver <cellog@php.net>
Fri, 24 Jul 2009 22:09:36 +0000 (22:09 +0000)
committerGreg Beaver <cellog@php.net>
Fri, 24 Jul 2009 22:09:36 +0000 (22:09 +0000)
ext/phar/tests/009.phpt
ext/phar/tests/016.phpt

index 8b1db2f09201f1cfffcdc554c84ebbe576d9b8da..61933b3814cce3d2ab2e0834f00595974a1e1580 100644 (file)
@@ -9,7 +9,7 @@ phar.require_hash=0
 $file = b"<?php
 Phar::mapPhar('hio');
 __HALT_COMPILER(); ?>";
-$file .= pack('VVnVVV', 500, 500, 0x1000, 0x00000000, 0, 0) . str_repeat('A', 500);
+$file .= (binary) pack(b'VVnVVV', 500, 500, 0x1000, 0x00000000, 0, 0) . (binary) str_repeat((binary)'A', 500);
 file_put_contents(dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php', $file);
 try {
 include dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
index 302d06d3cb3d1d2ac49c547c563440c0e87431ba..3288e8eca4d94923cd17196a1e8dbfa6da8ee08f 100644 (file)
@@ -9,14 +9,14 @@ phar.require_hash=0
 <?php
 $fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
 $pname = 'phar://' . $fname;
-$file = "<?php __HALT_COMPILER(); ?>";
+$file = b"<?php __HALT_COMPILER(); ?>";
 // file length is too short
 
 $files = array();
 // "hi" gzdeflated
-$files['a'] = array('cont'=>'a','comp'=> pack('H*', 'cbc80400'),'flags'=>0x00001000, 'ulen' => 1, 'clen' => 4);
+$files['a'] = array('cont'=>b'a','comp'=> (binary)pack('H*', 'cbc80400'),'flags'=>0x00001000, 'ulen' => 1, 'clen' => 4);
 $files['b'] = $files['a'];
-$files['c'] = array('cont'=>'*');
+$files['c'] = array('cont'=>b'*');
 $files['d'] = $files['a'];
 include 'files/phar_test.inc';