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); }