$request = Request::
create('http://foo', 'GET',
[],
[],
[],
['CONTENT_LENGTH' => 1024
]);
$requestStack =
new RequestStack();
$requestStack->
push($request);
$serverParams =
new ServerParams($requestStack);
$this->
assertEquals(1024,
$serverParams->
getContentLength());
} /** @dataProvider getGetPostMaxSizeTestData */
public function testGetPostMaxSize($size,
$bytes) { $serverParams =
new DummyServerParams($size);
$this->
assertEquals($bytes,
$serverParams->
getPostMaxSize());
} public static function getGetPostMaxSizeTestData() { return [ ['2k', 2048
],
['2 k', 2048
],
['8m', 8 * 1024 * 1024
],
['+2 k', 2048
],
[