1 | <?php |
||
23 | final class TestKernel extends Kernel |
||
24 | { |
||
25 | use MicroKernelTrait; |
||
26 | |||
27 | /** |
||
28 | * {@inheritdoc} |
||
29 | */ |
||
30 | public function registerBundles() |
||
31 | { |
||
32 | return [ |
||
33 | new FrameworkBundle(), |
||
34 | new DunglasActionBundle(), |
||
35 | new SensioFrameworkExtraBundle(), |
||
36 | new TestBundle(), |
||
37 | ]; |
||
38 | } |
||
39 | |||
40 | /** |
||
41 | * {@inheritdoc} |
||
42 | */ |
||
43 | protected function configureRoutes(RouteCollectionBuilder $routes) |
||
44 | { |
||
45 | // Specify explicitly the controller |
||
46 | $routes->add('/', 'action.Dunglas\ActionBundle\Tests\Fixtures\TestBundle\Action\DummyAction', 'dummy'); |
||
47 | // Use the @Route annotation of SensioExtraFrameworkBundle |
||
48 | $routes->import('@TestBundle/Action/', '/', 'annotation'); |
||
49 | } |
||
50 | |||
51 | /** |
||
52 | * {@inheritdoc} |
||
53 | */ |
||
54 | protected function configureContainer(ContainerBuilder $c, LoaderInterface $loader) |
||
55 | { |
||
56 | $c->loadFromExtension('framework', [ |
||
57 | 'secret' => 'MySecretKey', |
||
58 | 'test' => null, |
||
59 | ]); |
||
60 | |||
61 | $c->register('action.Dunglas\ActionBundle\Tests\Fixtures\TestBundle\Action\OverrideAction', 'Dunglas\ActionBundle\Tests\Fixtures\TestBundle\Action\OverrideAction'); |
||
62 | } |
||
63 | } |
||
64 |