xref: /PHP-5.3/ext/phar/tests/zip/largezip.phpt (revision 16b4d8e0)
1--TEST--
2Phar: large zip file (zip edge cases)
3--SKIPIF--
4<?php if (!extension_loaded("phar")) die("skip");?>
5--INI--
6phar.require_hash=0
7phar.readonly=0
8--FILE--
9<?php
10$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.zip.php';
11$fname2 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.2.phar.zip.php';
12$pname = 'phar://' . $fname;
13$pname2 = 'phar://' . $fname2;
14
15$p = new Phar($fname);
16$p['big'] = str_repeat(str_repeat('hi', 100), 1000);
17$p['big2'] = str_repeat(str_repeat('hi', 100), 1000);
18
19copy($fname, $fname2);
20$p2 = new Phar($fname2);
21var_dump(strlen($p2['big']->getContent()));
22?>
23===DONE===
24--CLEAN--
25<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.zip.php'); ?>
26<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.2.phar.zip.php'); ?>
27--EXPECT--
28int(200000)
29===DONE===
30