From: Greg Beaver Date: Fri, 24 Jul 2009 22:09:36 +0000 (+0000) Subject: update test to work in php 6 X-Git-Tag: php-5.4.0alpha1~191^2~2996 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=93e31b4d2fe1ea5338f37d9d75c9c203edb47cd3;p=php update test to work in php 6 --- diff --git a/ext/phar/tests/009.phpt b/ext/phar/tests/009.phpt index 8b1db2f092..61933b3814 100644 --- a/ext/phar/tests/009.phpt +++ b/ext/phar/tests/009.phpt @@ -9,7 +9,7 @@ phar.require_hash=0 $file = b""; -$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'; diff --git a/ext/phar/tests/016.phpt b/ext/phar/tests/016.phpt index 302d06d3cb..3288e8eca4 100644 --- a/ext/phar/tests/016.phpt +++ b/ext/phar/tests/016.phpt @@ -9,14 +9,14 @@ phar.require_hash=0 "; +$file = b""; // 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';