Skip to content

Commit 8f0afd5

Browse files
author
Maciej Mroziński
committed
Add more, complicated tests
1 parent 264c003 commit 8f0afd5

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

tests/DecodeChunkedStreamTest.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,23 @@ public function provideChunkedEncoding()
4747
["0017\r\nWikipedia in\r\n\r\nchunks.\r\n0\r\n\r\n"]
4848
],
4949
'varnish-type-response-2' => [
50+
["000017\r\nWikipedia in\r\n\r\nchunks.\r\n0\r\n\r\n"]
51+
],
52+
'varnish-type-response-3' => [
53+
["017\r\nWikipedia in\r\n\r\nchunks.\r\n0\r\n\r\n"]
54+
],
55+
'varnish-type-response-4' => [
5056
["004\r\nWiki\r\n005\r\npedia\r\n00e\r\n in\r\n\r\nchunks.\r\n0\r\n\r\n"]
5157
],
58+
'varnish-type-response-5' => [
59+
["000004\r\nWiki\r\n00005\r\npedia\r\n000e\r\n in\r\n\r\nchunks.\r\n0\r\n\r\n"]
60+
],
5261
'varnish-type-response-extra-line' => [
5362
["006\r\nWi\r\nki\r\n005\r\npedia\r\n00e\r\n in\r\n\r\nchunks.\r\n0\r\n\r\n"],
5463
"Wi\r\nkipedia in\r\n\r\nchunks."
64+
],
65+
'varnish-type-response-random' => [
66+
[str_repeat("0", rand(0, 10)), "4\r\nWiki\r\n", str_repeat("0", rand(0, 10)), "5\r\npedia\r\n", str_repeat("0", rand(0, 10)), "e\r\n in\r\n\r\nchunks.\r\n0\r\n\r\n"]
5567
]
5668
];
5769
}

0 commit comments

Comments
 (0)