We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e15eac2 commit 74224d3Copy full SHA for 74224d3
tests/Parser/PaxHeaderTest.php
@@ -33,13 +33,15 @@ protected function generateSingleFile(?int $chunkSize = null, ?int $totalSize =
33
$data = implode("\n", [
34
implode(' ', array_reverse([$data = 'size=' . $totalSize, strlen($data)])),
35
]) . "\n";
36
+ $dataLength = strlen($data);
37
+ $data = str_pad($data, 512 * ceil($dataLength / 512), "\0");
38
39
yield str_pad(implode('', [
40
/* 0 */ 'name' => str_pad('massive_file.txt', 100, "\0"),
41
/*100*/ 'mode' => str_pad('', 8, "\0"),
42
/*108*/ 'uid' => str_pad('', 8, "\0"),
43
/*116*/ 'gid' => str_pad('', 8, "\0"),
- /*100*/ 'size' => str_pad(decoct(strlen($data)), 12, "\0"),
44
+ /*100*/ 'size' => str_pad(decoct($dataLength), 12, "\0"),
45
/*136*/ 'mtime' => str_pad('', 12, "\0"),
46
/*148*/ 'chksum' => str_pad('', 8, "\0"),
47
/*156*/ 'typeflag' => 'x',
0 commit comments