コード例 #1
0
 /**
  * @dataProvider canShowTabDataProvider
  * @param bool $isVirtual
  * @param int $themeId
  * @param bool $result
  */
 public function testCanShowTab($isVirtual, $themeId, $result)
 {
     $themeMock = $this->getMock('Magento\\Theme\\Model\\Theme', ['isVirtual', 'getId', '__wakeup'], [], '', false);
     $themeMock->expects($this->any())->method('isVirtual')->will($this->returnValue($isVirtual));
     $themeMock->expects($this->any())->method('getId')->will($this->returnValue($themeId));
     $this->_model->expects($this->any())->method('_getCurrentTheme')->will($this->returnValue($themeMock));
     if ($result === true) {
         $this->assertTrue($this->_model->canShowTab());
     } else {
         $this->assertFalse($this->_model->canShowTab());
     }
 }