/**
  * @expectedException \RuntimeException
  */
 public function testGetBlockServiceException()
 {
     $container = $this->getMock('Symfony\\Component\\DependencyInjection\\ContainerInterface');
     $manager = new BlockServiceManager($container, true);
     $block = $this->getMock('Sonata\\BlockBundle\\Model\\BlockInterface');
     $block->expects($this->any())->method('getType')->will($this->returnValue('fakse'));
     $manager->get($block);
 }
Exemplo n.º 2
0
 public function postPersist($object)
 {
     $service = $this->blockManager->get($object);
     $this->cacheManager->invalidate($service->getCacheKeys($object));
 }