Exemple #1
0
 public function testRenderByOtherRenderer()
 {
     $expected = 'some rendered string';
     $view = new BlockView();
     $otherRenderer = $this->getMock('Oro\\Component\\Layout\\LayoutRendererInterface');
     $this->rendererRegistry->addRenderer('other', $otherRenderer);
     $otherRenderer->expects($this->once())->method('renderBlock')->with($this->identicalTo($view))->will($this->returnValue($expected));
     $layout = new Layout($view, $this->rendererRegistry);
     $result = $layout->setRenderer('other')->render();
     $this->assertEquals($expected, $result);
 }