diff options
Diffstat (limited to 'vendor/symfony/http-kernel/Tests/Exception')
5 files changed, 26 insertions, 26 deletions
diff --git a/vendor/symfony/http-kernel/Tests/Exception/HttpExceptionTest.php b/vendor/symfony/http-kernel/Tests/Exception/HttpExceptionTest.php index b64773551e..f5fe97255b 100644 --- a/vendor/symfony/http-kernel/Tests/Exception/HttpExceptionTest.php +++ b/vendor/symfony/http-kernel/Tests/Exception/HttpExceptionTest.php @@ -9,22 +9,22 @@ class HttpExceptionTest extends TestCase { public function headerDataProvider() { - return array( - array(array('X-Test' => 'Test')), - array(array('X-Test' => 1)), - array( - array( - array('X-Test' => 'Test'), - array('X-Test-2' => 'Test-2'), - ), - ), - ); + return [ + [['X-Test' => 'Test']], + [['X-Test' => 1]], + [ + [ + ['X-Test' => 'Test'], + ['X-Test-2' => 'Test-2'], + ], + ], + ]; } public function testHeadersDefault() { $exception = $this->createException(); - $this->assertSame(array(), $exception->getHeaders()); + $this->assertSame([], $exception->getHeaders()); } /** diff --git a/vendor/symfony/http-kernel/Tests/Exception/MethodNotAllowedHttpExceptionTest.php b/vendor/symfony/http-kernel/Tests/Exception/MethodNotAllowedHttpExceptionTest.php index ea82014952..991f97582d 100644 --- a/vendor/symfony/http-kernel/Tests/Exception/MethodNotAllowedHttpExceptionTest.php +++ b/vendor/symfony/http-kernel/Tests/Exception/MethodNotAllowedHttpExceptionTest.php @@ -8,17 +8,17 @@ class MethodNotAllowedHttpExceptionTest extends HttpExceptionTest { public function testHeadersDefault() { - $exception = new MethodNotAllowedHttpException(array('GET', 'PUT')); - $this->assertSame(array('Allow' => 'GET, PUT'), $exception->getHeaders()); + $exception = new MethodNotAllowedHttpException(['GET', 'PUT']); + $this->assertSame(['Allow' => 'GET, PUT'], $exception->getHeaders()); } public function testWithHeaderConstruct() { - $headers = array( + $headers = [ 'Cache-Control' => 'public, s-maxage=1200', - ); + ]; - $exception = new MethodNotAllowedHttpException(array('get'), null, null, null, $headers); + $exception = new MethodNotAllowedHttpException(['get'], null, null, null, $headers); $headers['Allow'] = 'GET'; @@ -30,7 +30,7 @@ class MethodNotAllowedHttpExceptionTest extends HttpExceptionTest */ public function testHeadersSetter($headers) { - $exception = new MethodNotAllowedHttpException(array('GET')); + $exception = new MethodNotAllowedHttpException(['GET']); $exception->setHeaders($headers); $this->assertSame($headers, $exception->getHeaders()); } diff --git a/vendor/symfony/http-kernel/Tests/Exception/ServiceUnavailableHttpExceptionTest.php b/vendor/symfony/http-kernel/Tests/Exception/ServiceUnavailableHttpExceptionTest.php index 83cbdc2bcc..daa4fa407a 100644 --- a/vendor/symfony/http-kernel/Tests/Exception/ServiceUnavailableHttpExceptionTest.php +++ b/vendor/symfony/http-kernel/Tests/Exception/ServiceUnavailableHttpExceptionTest.php @@ -9,14 +9,14 @@ class ServiceUnavailableHttpExceptionTest extends HttpExceptionTest public function testHeadersDefaultRetryAfter() { $exception = new ServiceUnavailableHttpException(10); - $this->assertSame(array('Retry-After' => 10), $exception->getHeaders()); + $this->assertSame(['Retry-After' => 10], $exception->getHeaders()); } public function testWithHeaderConstruct() { - $headers = array( + $headers = [ 'Cache-Control' => 'public, s-maxage=1337', - ); + ]; $exception = new ServiceUnavailableHttpException(1337, null, null, null, $headers); diff --git a/vendor/symfony/http-kernel/Tests/Exception/TooManyRequestsHttpExceptionTest.php b/vendor/symfony/http-kernel/Tests/Exception/TooManyRequestsHttpExceptionTest.php index 6ec7f3d079..0048ec85c0 100644 --- a/vendor/symfony/http-kernel/Tests/Exception/TooManyRequestsHttpExceptionTest.php +++ b/vendor/symfony/http-kernel/Tests/Exception/TooManyRequestsHttpExceptionTest.php @@ -9,14 +9,14 @@ class TooManyRequestsHttpExceptionTest extends HttpExceptionTest public function testHeadersDefaultRertyAfter() { $exception = new TooManyRequestsHttpException(10); - $this->assertSame(array('Retry-After' => 10), $exception->getHeaders()); + $this->assertSame(['Retry-After' => 10], $exception->getHeaders()); } public function testWithHeaderConstruct() { - $headers = array( + $headers = [ 'Cache-Control' => 'public, s-maxage=69', - ); + ]; $exception = new TooManyRequestsHttpException(69, null, null, null, $headers); diff --git a/vendor/symfony/http-kernel/Tests/Exception/UnauthorizedHttpExceptionTest.php b/vendor/symfony/http-kernel/Tests/Exception/UnauthorizedHttpExceptionTest.php index 1e93d25b1a..c7239e70b3 100644 --- a/vendor/symfony/http-kernel/Tests/Exception/UnauthorizedHttpExceptionTest.php +++ b/vendor/symfony/http-kernel/Tests/Exception/UnauthorizedHttpExceptionTest.php @@ -9,14 +9,14 @@ class UnauthorizedHttpExceptionTest extends HttpExceptionTest public function testHeadersDefault() { $exception = new UnauthorizedHttpException('Challenge'); - $this->assertSame(array('WWW-Authenticate' => 'Challenge'), $exception->getHeaders()); + $this->assertSame(['WWW-Authenticate' => 'Challenge'], $exception->getHeaders()); } public function testWithHeaderConstruct() { - $headers = array( + $headers = [ 'Cache-Control' => 'public, s-maxage=1200', - ); + ]; $exception = new UnauthorizedHttpException('Challenge', null, null, null, $headers); |
