Example #1
0
 /**
  * @covers \Magento\Framework\View\Design\Theme\Customization::delete
  */
 public function testDelete()
 {
     $file = $this->getMock('Magento\\Core\\Model\\Theme\\File', array('__wakeup', 'delete'), array(), '', false);
     $file->expects($this->once())->method('delete')->will($this->returnSelf());
     $file->setData(array('id' => 1, 'theme_id' => 123, 'file_path' => 'css/custom_file1.css', 'content' => 'css content', 'sort_order' => 1));
     $this->fileProvider->expects($this->once())->method('getItems')->with($this->theme)->will($this->returnValue(array($file)));
     $this->assertInstanceOf('Magento\\Framework\\View\\Design\\Theme\\CustomizationInterface', $this->model->delete(array(1)));
 }