public function testGetListFromValidContext() { $container = $this->getMock('Symfony\\Component\\DependencyInjection\\ContainerInterface'); $manager = new BlockServiceManager($container, true); $service = $this->getMock('Sonata\\BlockBundle\\Block\\BlockServiceInterface'); $manager->add('foo.bar', $service, array('fake')); $this->assertNotEmpty($manager->getServicesByContext('fake')); }