Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / vendor / symfony / http-kernel / Tests / TestHttpKernel.php
1 <?php
2
3 /*
4  * This file is part of the Symfony package.
5  *
6  * (c) Fabien Potencier <fabien@symfony.com>
7  *
8  * For the full copyright and license information, please view the LICENSE
9  * file that was distributed with this source code.
10  */
11
12 namespace Symfony\Component\HttpKernel\Tests;
13
14 use Symfony\Component\EventDispatcher\EventDispatcher;
15 use Symfony\Component\HttpFoundation\Request;
16 use Symfony\Component\HttpFoundation\Response;
17 use Symfony\Component\HttpKernel\Controller\ArgumentResolverInterface;
18 use Symfony\Component\HttpKernel\Controller\ControllerResolverInterface;
19 use Symfony\Component\HttpKernel\HttpKernel;
20
21 class TestHttpKernel extends HttpKernel implements ControllerResolverInterface, ArgumentResolverInterface
22 {
23     public function __construct()
24     {
25         parent::__construct(new EventDispatcher(), $this, null, $this);
26     }
27
28     public function getController(Request $request)
29     {
30         return array($this, 'callController');
31     }
32
33     public function getArguments(Request $request, $controller)
34     {
35         return array($request);
36     }
37
38     public function callController(Request $request)
39     {
40         return new Response('Request: '.$request->getRequestUri());
41     }
42 }