mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-12 13:24:25 +00:00
47 lines
1.1 KiB
PHP
47 lines
1.1 KiB
PHP
<?php
|
|
|
|
namespace Chill\MainBundle\Tests\Services;
|
|
|
|
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
|
|
use Symfony\Component\Routing\RouteCollection;
|
|
|
|
/**
|
|
* This class provide functional test for MenuComposer
|
|
*
|
|
* @author Julien Fastré <julien.fastre@champs-libres.coop>
|
|
*/
|
|
class MenuComposerTest extends KernelTestCase
|
|
{
|
|
|
|
/**
|
|
*
|
|
* @var \Symfony\Bundle\FrameworkBundle\Routing\DelegatingLoader;
|
|
*/
|
|
private $loader;
|
|
|
|
/**
|
|
*
|
|
* @var \Chill\MainBundle\DependencyInjection\Services\MenuComposer;
|
|
*/
|
|
private $menuComposer;
|
|
|
|
public function setUp()
|
|
{
|
|
self::bootKernel(array('environment' => 'test'));
|
|
$this->menuComposer = static::$container
|
|
->get('chill.main.menu_composer');
|
|
}
|
|
|
|
/**
|
|
* @covers \Chill\MainBundle\Routing\MenuComposer
|
|
*/
|
|
public function testMenuComposer()
|
|
{
|
|
$collection = new RouteCollection();
|
|
|
|
$routes = $this->menuComposer->getRoutesFor('dummy0');
|
|
|
|
$this->assertInternalType('array', $routes);
|
|
}
|
|
}
|