aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorPaul Duncan <pabs@pablotron.org>2018-09-03 09:39:02 -0400
committerPaul Duncan <pabs@pablotron.org>2018-09-03 09:54:54 -0400
commit1fbf6c466dc01d63ba119e4614ef9190ee9d87ff (patch)
tree09c735cae623eb60995a9fcd2c85c61497a95b1d /tests
parenteca42d118e439dc0f3796650e8a68992d513f8ee (diff)
downloadzipstream-php-1fbf6c466dc01d63ba119e4614ef9190ee9d87ff.tar.bz2
zipstream-php-1fbf6c466dc01d63ba119e4614ef9190ee9d87ff.zip
add README.mkd, examples/examples.json, and minor comment cleanups
Diffstat (limited to 'tests')
-rw-r--r--tests/LargeFileTest.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/LargeFileTest.php b/tests/LargeFileTest.php
index c271b47..b1106ec 100644
--- a/tests/LargeFileTest.php
+++ b/tests/LargeFileTest.php
@@ -8,11 +8,12 @@ use \Pablotron\ZipStream\ZipStream;
final class LargeFileTest extends BaseTestCase {
public function testCreateLargeFile() : void {
- # build 4M string
+ # size and number of chunks
$chunk_size = (1 << 22);
$num_chunks = 1025;
- # calculate expected size
+ # calculate expected file size (4299161600, enough to overflow a
+ # 32-bit integer and trigger zip64 mode)
$expected_size = $chunk_size * $num_chunks;
$this->with_temp_zip(function(ZipStream &$zip) use ($chunk_size, $num_chunks) {