summaryrefslogtreecommitdiff
path: root/vendor/symfony/http-kernel/Tests/Exception/HttpExceptionTest.php
diff options
context:
space:
mode:
authorGreg Roach <fisharebest@webtrees.net>2019-06-03 14:19:10 +0100
committerGreg Roach <fisharebest@webtrees.net>2019-06-03 14:19:10 +0100
commit69c8d4f5c90cef75da102f92e4e992d03a8f1cd8 (patch)
tree4f956848961891482b64ee2cd5c8d7290936e354 /vendor/symfony/http-kernel/Tests/Exception/HttpExceptionTest.php
parent425f99bc29ab9e477e5407b5c86da5c85ba47461 (diff)
downloadwebtrees-69c8d4f5c90cef75da102f92e4e992d03a8f1cd8.tar.gz
webtrees-69c8d4f5c90cef75da102f92e4e992d03a8f1cd8.tar.bz2
webtrees-69c8d4f5c90cef75da102f92e4e992d03a8f1cd8.zip
:Update vendor dependencies
Diffstat (limited to 'vendor/symfony/http-kernel/Tests/Exception/HttpExceptionTest.php')
-rw-r--r--vendor/symfony/http-kernel/Tests/Exception/HttpExceptionTest.php12
1 files changed, 10 insertions, 2 deletions
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);
}
}