diff options
Diffstat (limited to 'vendor/symfony/http-kernel/Tests/ClientTest.php')
| -rw-r--r-- | vendor/symfony/http-kernel/Tests/ClientTest.php | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/vendor/symfony/http-kernel/Tests/ClientTest.php b/vendor/symfony/http-kernel/Tests/ClientTest.php index 4ce3670a30..c260727849 100644 --- a/vendor/symfony/http-kernel/Tests/ClientTest.php +++ b/vendor/symfony/http-kernel/Tests/ClientTest.php @@ -70,7 +70,7 @@ class ClientTest extends TestCase $response->headers->setCookie($cookie2 = new Cookie('foo1', 'bar1', \DateTime::createFromFormat('j-M-Y H:i:s T', '15-Feb-2009 20:00:00 GMT')->format('U'), '/foo', 'http://example.com', true, true, false, null)); $domResponse = $m->invoke($client, $response); $this->assertSame((string) $cookie1, $domResponse->getHeader('Set-Cookie')); - $this->assertSame(array((string) $cookie1, (string) $cookie2), $domResponse->getHeader('Set-Cookie', false)); + $this->assertSame([(string) $cookie1, (string) $cookie2], $domResponse->getHeader('Set-Cookie', false)); } public function testFilterResponseSupportsStreamedResponses() @@ -99,14 +99,14 @@ class ClientTest extends TestCase $kernel = new TestHttpKernel(); $client = new Client($kernel); - $files = array( - array('tmp_name' => $source, 'name' => 'original', 'type' => 'mime/original', 'size' => null, 'error' => UPLOAD_ERR_OK), + $files = [ + ['tmp_name' => $source, 'name' => 'original', 'type' => 'mime/original', 'size' => null, 'error' => UPLOAD_ERR_OK], new UploadedFile($source, 'original', 'mime/original', UPLOAD_ERR_OK, true), - ); + ]; $file = null; foreach ($files as $file) { - $client->request('POST', '/', array(), array('foo' => $file)); + $client->request('POST', '/', [], ['foo' => $file]); $files = $client->getRequest()->files->all(); @@ -130,9 +130,9 @@ class ClientTest extends TestCase $kernel = new TestHttpKernel(); $client = new Client($kernel); - $file = array('tmp_name' => '', 'name' => '', 'type' => '', 'size' => 0, 'error' => UPLOAD_ERR_NO_FILE); + $file = ['tmp_name' => '', 'name' => '', 'type' => '', 'size' => 0, 'error' => UPLOAD_ERR_NO_FILE]; - $client->request('POST', '/', array(), array('foo' => $file)); + $client->request('POST', '/', [], ['foo' => $file]); $files = $client->getRequest()->files->all(); @@ -149,8 +149,8 @@ class ClientTest extends TestCase $file = $this ->getMockBuilder('Symfony\Component\HttpFoundation\File\UploadedFile') - ->setConstructorArgs(array($source, 'original', 'mime/original', UPLOAD_ERR_OK, true)) - ->setMethods(array('getSize', 'getClientSize')) + ->setConstructorArgs([$source, 'original', 'mime/original', UPLOAD_ERR_OK, true]) + ->setMethods(['getSize', 'getClientSize']) ->getMock() ; /* should be modified when the getClientSize will be removed */ @@ -163,7 +163,7 @@ class ClientTest extends TestCase ->will($this->returnValue(INF)) ; - $client->request('POST', '/', array(), array($file)); + $client->request('POST', '/', [], [$file]); $files = $client->getRequest()->files->all(); |
