Beispiel #1
0
 public function testGetAllOptions()
 {
     $expectedOptions = array('0' => array('value' => '', 'label' => 'No layout updates'), '1' => array('value' => 'option_value', 'label' => 'option_label'));
     $mockPageLayoutConfig = $this->getMockBuilder('Magento\\Framework\\View\\PageLayout\\Config')->disableOriginalConstructor()->getMock();
     $mockPageLayoutConfig->expects($this->any())->method('toOptionArray')->will($this->returnValue(['0' => $expectedOptions['1']]));
     $this->pageLayoutBuilder->expects($this->once())->method('getPageLayoutsConfig')->will($this->returnValue($mockPageLayoutConfig));
     $layoutOptions = $this->layoutModel->getAllOptions();
     $this->assertEquals($expectedOptions, $layoutOptions);
 }