| Conditions | 1 |
| Paths | 1 |
| Total Lines | 19 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 27 | public function testBlocksLoading() |
||
| 28 | { |
||
| 29 | $container = new ContainerBuilder(); |
||
| 30 | $container->setParameter('kernel.bundles', array( |
||
| 31 | 'SonataBlockBundle' => 'Sonata\BlockBundle\SonataBlockBundle', |
||
| 32 | 'KnpMenuBundle' => 'Knp\Bundle\MenuBundle\KnpMenuBundle', |
||
| 33 | )); |
||
| 34 | |||
| 35 | $extension = new SonataSeoExtension(); |
||
| 36 | $extension->load(array(array()), $container); |
||
| 37 | |||
| 38 | $this->assertTrue($container->hasDefinition('sonata.seo.block.breadcrumb.homepage')); |
||
| 39 | |||
| 40 | $container = new ContainerBuilder(); |
||
| 41 | $container->setParameter('kernel.bundles', array()); |
||
| 42 | $extension->load(array(array()), $container); |
||
| 43 | |||
| 44 | $this->assertFalse($container->hasDefinition('sonata.seo.block.breadcrumb.homepage')); |
||
| 45 | } |
||
| 46 | } |
||
| 47 |