示例#1
0
 /**
  * @covers \Magento\Framework\View\Design\Theme\Customization::reorder
  * @dataProvider customFileContent
  */
 public function testReorder($sequence, $filesContent)
 {
     $files = array();
     $type = 'sample-type';
     foreach ($filesContent as $fileContent) {
         $file = $this->getMock('Magento\\Core\\Model\\Theme\\File', array('__wakeup', 'save'), array(), '', false);
         $file->expects($fileContent['isCalled'])->method('save')->will($this->returnSelf());
         $file->setData($fileContent['content']);
         $files[] = $file;
     }
     $this->fileProvider->expects($this->once())->method('getItems')->with($this->theme, array('file_type' => $type))->will($this->returnValue($files));
     $this->assertInstanceOf('Magento\\Framework\\View\\Design\\Theme\\CustomizationInterface', $this->model->reorder($type, $sequence));
 }