summaryrefslogtreecommitdiff
path: root/vendor/symfony/http-kernel/Tests/Exception
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/symfony/http-kernel/Tests/Exception')
-rw-r--r--vendor/symfony/http-kernel/Tests/Exception/AccessDeniedHttpExceptionTest.php4
-rw-r--r--vendor/symfony/http-kernel/Tests/Exception/BadRequestHttpExceptionTest.php4
-rw-r--r--vendor/symfony/http-kernel/Tests/Exception/ConflictHttpExceptionTest.php4
-rw-r--r--vendor/symfony/http-kernel/Tests/Exception/GoneHttpExceptionTest.php4
-rw-r--r--vendor/symfony/http-kernel/Tests/Exception/HttpExceptionTest.php12
-rw-r--r--vendor/symfony/http-kernel/Tests/Exception/LengthRequiredHttpExceptionTest.php4
-rw-r--r--vendor/symfony/http-kernel/Tests/Exception/MethodNotAllowedHttpExceptionTest.php5
-rw-r--r--vendor/symfony/http-kernel/Tests/Exception/NotAcceptableHttpExceptionTest.php4
-rw-r--r--vendor/symfony/http-kernel/Tests/Exception/NotFoundHttpExceptionTest.php4
-rw-r--r--vendor/symfony/http-kernel/Tests/Exception/PreconditionFailedHttpExceptionTest.php4
-rw-r--r--vendor/symfony/http-kernel/Tests/Exception/PreconditionRequiredHttpExceptionTest.php4
-rw-r--r--vendor/symfony/http-kernel/Tests/Exception/ServiceUnavailableHttpExceptionTest.php4
-rw-r--r--vendor/symfony/http-kernel/Tests/Exception/TooManyRequestsHttpExceptionTest.php4
-rw-r--r--vendor/symfony/http-kernel/Tests/Exception/UnauthorizedHttpExceptionTest.php5
-rw-r--r--vendor/symfony/http-kernel/Tests/Exception/UnprocessableEntityHttpExceptionTest.php4
-rw-r--r--vendor/symfony/http-kernel/Tests/Exception/UnsupportedMediaTypeHttpExceptionTest.php4
16 files changed, 46 insertions, 28 deletions
diff --git a/vendor/symfony/http-kernel/Tests/Exception/AccessDeniedHttpExceptionTest.php b/vendor/symfony/http-kernel/Tests/Exception/AccessDeniedHttpExceptionTest.php
index 2bfcb2bf80..3a34cc47bc 100644
--- a/vendor/symfony/http-kernel/Tests/Exception/AccessDeniedHttpExceptionTest.php
+++ b/vendor/symfony/http-kernel/Tests/Exception/AccessDeniedHttpExceptionTest.php
@@ -6,8 +6,8 @@ use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException;
class AccessDeniedHttpExceptionTest extends HttpExceptionTest
{
- protected function createException()
+ protected function createException(string $message = null, \Throwable $previous = null, ?int $code = 0, array $headers = [])
{
- return new AccessDeniedHttpException();
+ return new AccessDeniedHttpException($message, $previous, $code, $headers);
}
}
diff --git a/vendor/symfony/http-kernel/Tests/Exception/BadRequestHttpExceptionTest.php b/vendor/symfony/http-kernel/Tests/Exception/BadRequestHttpExceptionTest.php
index 5fd54ccf44..462fd9cb1d 100644
--- a/vendor/symfony/http-kernel/Tests/Exception/BadRequestHttpExceptionTest.php
+++ b/vendor/symfony/http-kernel/Tests/Exception/BadRequestHttpExceptionTest.php
@@ -6,8 +6,8 @@ use Symfony\Component\HttpKernel\Exception\BadRequestHttpException;
class BadRequestHttpExceptionTest extends HttpExceptionTest
{
- protected function createException()
+ protected function createException(string $message = null, \Throwable $previous = null, ?int $code = 0, array $headers = [])
{
- return new BadRequestHttpException();
+ return new BadRequestHttpException($message, $previous, $code, $headers);
}
}
diff --git a/vendor/symfony/http-kernel/Tests/Exception/ConflictHttpExceptionTest.php b/vendor/symfony/http-kernel/Tests/Exception/ConflictHttpExceptionTest.php
index 63cb49e6e0..760600a10f 100644
--- a/vendor/symfony/http-kernel/Tests/Exception/ConflictHttpExceptionTest.php
+++ b/vendor/symfony/http-kernel/Tests/Exception/ConflictHttpExceptionTest.php
@@ -6,8 +6,8 @@ use Symfony\Component\HttpKernel\Exception\ConflictHttpException;
class ConflictHttpExceptionTest extends HttpExceptionTest
{
- protected function createException()
+ protected function createException(string $message = null, \Throwable $previous = null, ?int $code = 0, array $headers = [])
{
- return new ConflictHttpException();
+ return new ConflictHttpException($message, $previous, $code, $headers);
}
}
diff --git a/vendor/symfony/http-kernel/Tests/Exception/GoneHttpExceptionTest.php b/vendor/symfony/http-kernel/Tests/Exception/GoneHttpExceptionTest.php
index ec5339d2af..30dafe4922 100644
--- a/vendor/symfony/http-kernel/Tests/Exception/GoneHttpExceptionTest.php
+++ b/vendor/symfony/http-kernel/Tests/Exception/GoneHttpExceptionTest.php
@@ -6,8 +6,8 @@ use Symfony\Component\HttpKernel\Exception\GoneHttpException;
class GoneHttpExceptionTest extends HttpExceptionTest
{
- protected function createException()
+ protected function createException(string $message = null, \Throwable $previous = null, ?int $code = 0, array $headers = [])
{
- return new GoneHttpException();
+ return new GoneHttpException($message, $previous, $code, $headers);
}
}
diff --git a/vendor/symfony/http-kernel/Tests/Exception/HttpExceptionTest.php b/vendor/symfony/http-kernel/Tests/Exception/HttpExceptionTest.php
index f5fe97255b..a9431f4b5a 100644
--- a/vendor/symfony/http-kernel/Tests/Exception/HttpExceptionTest.php
+++ b/vendor/symfony/http-kernel/Tests/Exception/HttpExceptionTest.php
@@ -46,8 +46,16 @@ class HttpExceptionTest extends TestCase
$this->assertSame($headers, $exception->getHeaders());
}
- protected function createException()
+ public function testThrowableIsAllowedForPrevious()
{
- return new HttpException(200);
+ $previous = new class('Error of PHP 7+') extends \Error {
+ };
+ $exception = $this->createException(null, $previous);
+ $this->assertSame($previous, $exception->getPrevious());
+ }
+
+ protected function createException(string $message = null, \Throwable $previous = null, ?int $code = 0, array $headers = [])
+ {
+ return new HttpException(200, $message, $previous, $headers, $code);
}
}
diff --git a/vendor/symfony/http-kernel/Tests/Exception/LengthRequiredHttpExceptionTest.php b/vendor/symfony/http-kernel/Tests/Exception/LengthRequiredHttpExceptionTest.php
index 462d3ca4fc..8676d67238 100644
--- a/vendor/symfony/http-kernel/Tests/Exception/LengthRequiredHttpExceptionTest.php
+++ b/vendor/symfony/http-kernel/Tests/Exception/LengthRequiredHttpExceptionTest.php
@@ -6,8 +6,8 @@ use Symfony\Component\HttpKernel\Exception\LengthRequiredHttpException;
class LengthRequiredHttpExceptionTest extends HttpExceptionTest
{
- protected function createException()
+ protected function createException(string $message = null, \Throwable $previous = null, ?int $code = 0, array $headers = [])
{
- return new LengthRequiredHttpException();
+ return new LengthRequiredHttpException($message, $previous, $code, $headers);
}
}
diff --git a/vendor/symfony/http-kernel/Tests/Exception/MethodNotAllowedHttpExceptionTest.php b/vendor/symfony/http-kernel/Tests/Exception/MethodNotAllowedHttpExceptionTest.php
index 991f97582d..efb0b50caf 100644
--- a/vendor/symfony/http-kernel/Tests/Exception/MethodNotAllowedHttpExceptionTest.php
+++ b/vendor/symfony/http-kernel/Tests/Exception/MethodNotAllowedHttpExceptionTest.php
@@ -34,4 +34,9 @@ class MethodNotAllowedHttpExceptionTest extends HttpExceptionTest
$exception->setHeaders($headers);
$this->assertSame($headers, $exception->getHeaders());
}
+
+ protected function createException(string $message = null, \Throwable $previous = null, ?int $code = 0, array $headers = [])
+ {
+ return new MethodNotAllowedHttpException(['get'], $message, $previous, $code, $headers);
+ }
}
diff --git a/vendor/symfony/http-kernel/Tests/Exception/NotAcceptableHttpExceptionTest.php b/vendor/symfony/http-kernel/Tests/Exception/NotAcceptableHttpExceptionTest.php
index 4c0db7a3cb..021c69e289 100644
--- a/vendor/symfony/http-kernel/Tests/Exception/NotAcceptableHttpExceptionTest.php
+++ b/vendor/symfony/http-kernel/Tests/Exception/NotAcceptableHttpExceptionTest.php
@@ -6,8 +6,8 @@ use Symfony\Component\HttpKernel\Exception\NotAcceptableHttpException;
class NotAcceptableHttpExceptionTest extends HttpExceptionTest
{
- protected function createException()
+ protected function createException(string $message = null, \Throwable $previous = null, ?int $code = 0, array $headers = [])
{
- return new NotAcceptableHttpException();
+ return new NotAcceptableHttpException($message, $previous, $code, $headers);
}
}
diff --git a/vendor/symfony/http-kernel/Tests/Exception/NotFoundHttpExceptionTest.php b/vendor/symfony/http-kernel/Tests/Exception/NotFoundHttpExceptionTest.php
index 62ede5b4b8..0bf369b1a0 100644
--- a/vendor/symfony/http-kernel/Tests/Exception/NotFoundHttpExceptionTest.php
+++ b/vendor/symfony/http-kernel/Tests/Exception/NotFoundHttpExceptionTest.php
@@ -6,8 +6,8 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
class NotFoundHttpExceptionTest extends HttpExceptionTest
{
- protected function createException()
+ protected function createException(string $message = null, \Throwable $previous = null, ?int $code = 0, array $headers = [])
{
- return new NotFoundHttpException();
+ return new NotFoundHttpException($message, $previous, $code, $headers);
}
}
diff --git a/vendor/symfony/http-kernel/Tests/Exception/PreconditionFailedHttpExceptionTest.php b/vendor/symfony/http-kernel/Tests/Exception/PreconditionFailedHttpExceptionTest.php
index 809252b757..04d79c499d 100644
--- a/vendor/symfony/http-kernel/Tests/Exception/PreconditionFailedHttpExceptionTest.php
+++ b/vendor/symfony/http-kernel/Tests/Exception/PreconditionFailedHttpExceptionTest.php
@@ -6,8 +6,8 @@ use Symfony\Component\HttpKernel\Exception\PreconditionFailedHttpException;
class PreconditionFailedHttpExceptionTest extends HttpExceptionTest
{
- protected function createException()
+ protected function createException(string $message = null, \Throwable $previous = null, ?int $code = 0, array $headers = [])
{
- return new PreconditionFailedHttpException();
+ return new PreconditionFailedHttpException($message, $previous, $code, $headers);
}
}
diff --git a/vendor/symfony/http-kernel/Tests/Exception/PreconditionRequiredHttpExceptionTest.php b/vendor/symfony/http-kernel/Tests/Exception/PreconditionRequiredHttpExceptionTest.php
index 69d362e3f6..82076617a8 100644
--- a/vendor/symfony/http-kernel/Tests/Exception/PreconditionRequiredHttpExceptionTest.php
+++ b/vendor/symfony/http-kernel/Tests/Exception/PreconditionRequiredHttpExceptionTest.php
@@ -6,8 +6,8 @@ use Symfony\Component\HttpKernel\Exception\PreconditionRequiredHttpException;
class PreconditionRequiredHttpExceptionTest extends HttpExceptionTest
{
- protected function createException()
+ protected function createException(string $message = null, \Throwable $previous = null, ?int $code = 0, array $headers = [])
{
- return new PreconditionRequiredHttpException();
+ return new PreconditionRequiredHttpException($message, $previous, $code, $headers);
}
}
diff --git a/vendor/symfony/http-kernel/Tests/Exception/ServiceUnavailableHttpExceptionTest.php b/vendor/symfony/http-kernel/Tests/Exception/ServiceUnavailableHttpExceptionTest.php
index daa4fa407a..fac197c852 100644
--- a/vendor/symfony/http-kernel/Tests/Exception/ServiceUnavailableHttpExceptionTest.php
+++ b/vendor/symfony/http-kernel/Tests/Exception/ServiceUnavailableHttpExceptionTest.php
@@ -35,8 +35,8 @@ class ServiceUnavailableHttpExceptionTest extends HttpExceptionTest
$this->assertSame($headers, $exception->getHeaders());
}
- protected function createException()
+ protected function createException(string $message = null, \Throwable $previous = null, ?int $code = 0, array $headers = [])
{
- return new ServiceUnavailableHttpException();
+ return new ServiceUnavailableHttpException(null, $message, $previous, $code, $headers);
}
}
diff --git a/vendor/symfony/http-kernel/Tests/Exception/TooManyRequestsHttpExceptionTest.php b/vendor/symfony/http-kernel/Tests/Exception/TooManyRequestsHttpExceptionTest.php
index 0048ec85c0..8b59e9894a 100644
--- a/vendor/symfony/http-kernel/Tests/Exception/TooManyRequestsHttpExceptionTest.php
+++ b/vendor/symfony/http-kernel/Tests/Exception/TooManyRequestsHttpExceptionTest.php
@@ -35,8 +35,8 @@ class TooManyRequestsHttpExceptionTest extends HttpExceptionTest
$this->assertSame($headers, $exception->getHeaders());
}
- protected function createException()
+ protected function createException(string $message = null, \Throwable $previous = null, ?int $code = 0, array $headers = [])
{
- return new TooManyRequestsHttpException();
+ return new TooManyRequestsHttpException(null, $message, $previous, $code, $headers);
}
}
diff --git a/vendor/symfony/http-kernel/Tests/Exception/UnauthorizedHttpExceptionTest.php b/vendor/symfony/http-kernel/Tests/Exception/UnauthorizedHttpExceptionTest.php
index c7239e70b3..92d427b6e4 100644
--- a/vendor/symfony/http-kernel/Tests/Exception/UnauthorizedHttpExceptionTest.php
+++ b/vendor/symfony/http-kernel/Tests/Exception/UnauthorizedHttpExceptionTest.php
@@ -34,4 +34,9 @@ class UnauthorizedHttpExceptionTest extends HttpExceptionTest
$exception->setHeaders($headers);
$this->assertSame($headers, $exception->getHeaders());
}
+
+ protected function createException(string $message = null, \Throwable $previous = null, ?int $code = 0, array $headers = [])
+ {
+ return new UnauthorizedHttpException('Challenge', $message, $previous, $code, $headers);
+ }
}
diff --git a/vendor/symfony/http-kernel/Tests/Exception/UnprocessableEntityHttpExceptionTest.php b/vendor/symfony/http-kernel/Tests/Exception/UnprocessableEntityHttpExceptionTest.php
index 05d8d787aa..ffa4e177ee 100644
--- a/vendor/symfony/http-kernel/Tests/Exception/UnprocessableEntityHttpExceptionTest.php
+++ b/vendor/symfony/http-kernel/Tests/Exception/UnprocessableEntityHttpExceptionTest.php
@@ -6,8 +6,8 @@ use Symfony\Component\HttpKernel\Exception\UnprocessableEntityHttpException;
class UnprocessableEntityHttpExceptionTest extends HttpExceptionTest
{
- protected function createException()
+ protected function createException(string $message = null, \Throwable $previous = null, ?int $code = 0, array $headers = [])
{
- return new UnprocessableEntityHttpException();
+ return new UnprocessableEntityHttpException($message, $previous, $code, $headers);
}
}
diff --git a/vendor/symfony/http-kernel/Tests/Exception/UnsupportedMediaTypeHttpExceptionTest.php b/vendor/symfony/http-kernel/Tests/Exception/UnsupportedMediaTypeHttpExceptionTest.php
index 4dae039c11..fa28bbd19b 100644
--- a/vendor/symfony/http-kernel/Tests/Exception/UnsupportedMediaTypeHttpExceptionTest.php
+++ b/vendor/symfony/http-kernel/Tests/Exception/UnsupportedMediaTypeHttpExceptionTest.php
@@ -6,8 +6,8 @@ use Symfony\Component\HttpKernel\Exception\UnsupportedMediaTypeHttpException;
class UnsupportedMediaTypeHttpExceptionTest extends HttpExceptionTest
{
- protected function createException()
+ protected function createException(string $message = null, \Throwable $previous = null, ?int $code = 0, array $headers = [])
{
- return new UnsupportedMediaTypeHttpException();
+ return new UnsupportedMediaTypeHttpException($message, $previous, $code, $headers);
}
}