public function testAddLayoutUpdate()
 {
     $id = 'test';
     $layoutUpdate = $this->getMock('Oro\\Component\\Layout\\LayoutUpdateInterface');
     $layoutManipulator = $this->getMock('Oro\\Component\\Layout\\DeferredLayoutManipulatorInterface');
     $layoutItem = $this->getMock('Oro\\Component\\Layout\\LayoutItemInterface');
     $layoutItem->expects($this->any())->method('getId')->willReturn($id);
     $layoutFactory = $this->layoutFactoryBuilder->addLayoutUpdate($id, $layoutUpdate)->getLayoutFactory();
     $layoutUpdate->expects($this->once())->method('updateLayout')->with($this->identicalTo($layoutManipulator), $this->identicalTo($layoutItem));
     $layoutFactory->getRegistry()->updateLayout($id, $layoutManipulator, $layoutItem);
 }
Esempio n. 2
0
 /**
  * Creates a layout factory builder with the default configuration.
  *
  * @return LayoutFactoryBuilderInterface
  */
 public static function createLayoutFactoryBuilder()
 {
     $builder = new LayoutFactoryBuilder();
     $builder->addExtension(new CoreExtension());
     return $builder;
 }