public function testConfigLoad()
 {
     $builder = new ContainerBuilder();
     // external services
     $builder->set('doctrine.orm.entity_manager', new \stdClass());
     $builder->set('security.token_storage', new \stdClass());
     $bundle = new ModeraBackendDashboardBundle();
     $bundle->build($builder);
     $ext = new ModeraBackendDashboardExtension();
     $ext->load(array(), $builder);
     $builder->compile();
     $this->assertTrue($builder->has('modera_backend_dashboard.contributions.menu_items_provider'));
     $menuProvider = $builder->getDefinition('modera_backend_dashboard.contributions.menu_items_provider');
     $this->assertEquals('Modera\\BackendDashboardBundle\\Contributions\\MenuItemsProvider', $menuProvider->getClass());
     $this->assertTrue($menuProvider->hasTag('modera_mjr_integration.menu.menu_items_provider'));
     // service provided by Expander bundle
     $this->assertTrue($builder->has('modera_backend_dashboard.dashboard_provider'));
     $this->assertTrue($builder->has('modera_backend_dashboard.dashboard_service'));
     $arg = $builder->getDefinition('modera_backend_dashboard.dashboard_service')->getArgument(0);
     $this->assertInstanceOf('Symfony\\Component\\DependencyInjection\\Reference', $arg);
     /* @var \Symfony\Component\DependencyInjection\Reference $arg */
     $this->assertEquals('modera_backend_dashboard.dashboard_provider', $arg->__toString());
     $this->assertTrue($builder->has('modera_backend_dashboard.contributions.config_mergers_provider'));
     $configProvider = $builder->getDefinition('modera_backend_dashboard.contributions.config_mergers_provider');
     $this->assertTrue($configProvider->hasTag('modera_mjr_integration.config.config_mergers_provider'));
 }
 public function testContributorIsInjected()
 {
     $containerBuilder = \Phake::mock('Symfony\\Component\\DependencyInjection\\ContainerBuilder');
     $bundle = new ModeraBackendDashboardBundle($containerBuilder);
     $bundle->build($containerBuilder);
     \Phake::verify($containerBuilder)->addCompilerPass(\Phake::capture($pass));
     $this->assertInstanceOf('Sli\\ExpanderBundle\\DependencyInjection\\CompositeContributorsProviderCompilerPass', $pass);
     /* @var CompositeContributorsProviderCompilerPass $pass */
     $this->assertEquals('modera_backend_dashboard.dashboard_provider', $pass->getProviderServiceId());
     $this->assertEquals('modera_backend_dashboard.dashboard_provider', $pass->getContributorServiceTagName());
 }