summaryrefslogtreecommitdiff
path: root/vendor/symfony/http-kernel/Tests/HttpKernelTest.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/HttpKernelTest.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/HttpKernelTest.php')
-rw-r--r--vendor/symfony/http-kernel/Tests/HttpKernelTest.php21
1 files changed, 9 insertions, 12 deletions
diff --git a/vendor/symfony/http-kernel/Tests/HttpKernelTest.php b/vendor/symfony/http-kernel/Tests/HttpKernelTest.php
index 4d1e267e3a..d1162f0431 100644
--- a/vendor/symfony/http-kernel/Tests/HttpKernelTest.php
+++ b/vendor/symfony/http-kernel/Tests/HttpKernelTest.php
@@ -20,8 +20,6 @@ use Symfony\Component\HttpFoundation\RequestStack;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\Controller\ArgumentResolverInterface;
use Symfony\Component\HttpKernel\Controller\ControllerResolverInterface;
-use Symfony\Component\HttpKernel\Event\FilterControllerArgumentsEvent;
-use Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent;
use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException;
use Symfony\Component\HttpKernel\Exception\ControllerDoesNotReturnResponseException;
use Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException;
@@ -128,7 +126,7 @@ class HttpKernelTest extends TestCase
public function testHandleWhenAnExceptionIsHandledWithASpecificStatusCode($expectedStatusCode)
{
$dispatcher = new EventDispatcher();
- $dispatcher->addListener(KernelEvents::EXCEPTION, function (GetResponseForExceptionEvent $event) use ($expectedStatusCode) {
+ $dispatcher->addListener(KernelEvents::EXCEPTION, function ($event) use ($expectedStatusCode) {
$event->allowCustomResponseCode();
$event->setResponse(new Response('', $expectedStatusCode));
});
@@ -215,20 +213,19 @@ class HttpKernelTest extends TestCase
public function testHandleWhenTheControllerDoesNotReturnAResponse()
{
$dispatcher = new EventDispatcher();
- $kernel = $this->getHttpKernel($dispatcher, function () { return 'foo'; });
+ $kernel = $this->getHttpKernel($dispatcher, function () {});
try {
$kernel->handle(new Request());
$this->fail('The kernel should throw an exception.');
} catch (ControllerDoesNotReturnResponseException $e) {
- }
+ $first = $e->getTrace()[0];
- $first = $e->getTrace()[0];
-
- // `file` index the array starting at 0, and __FILE__ starts at 1
- $line = file($first['file'])[$first['line'] - 2];
- $this->assertContains('// call controller', $line);
+ // `file` index the array starting at 0, and __FILE__ starts at 1
+ $line = file($first['file'])[$first['line'] - 2];
+ $this->assertContains('// call controller', $line);
+ }
}
public function testHandleWhenTheControllerDoesNotReturnAResponseButAViewIsRegistered()
@@ -257,7 +254,7 @@ class HttpKernelTest extends TestCase
public function testHandleAllowChangingControllerArguments()
{
$dispatcher = new EventDispatcher();
- $dispatcher->addListener(KernelEvents::CONTROLLER_ARGUMENTS, function (FilterControllerArgumentsEvent $event) {
+ $dispatcher->addListener(KernelEvents::CONTROLLER_ARGUMENTS, function ($event) {
$event->setArguments(['foo']);
});
@@ -269,7 +266,7 @@ class HttpKernelTest extends TestCase
public function testHandleAllowChangingControllerAndArguments()
{
$dispatcher = new EventDispatcher();
- $dispatcher->addListener(KernelEvents::CONTROLLER_ARGUMENTS, function (FilterControllerArgumentsEvent $event) {
+ $dispatcher->addListener(KernelEvents::CONTROLLER_ARGUMENTS, function ($event) {
$oldController = $event->getController();
$oldArguments = $event->getArguments();