コード例 #1
0
 public function testGetCloneModelCreatesCloneModel()
 {
     $cloneModel = $this->getMock('Magento\\Framework\\App\\Config\\ValueInterface', [], [], '', false);
     $this->_depMapperMock = $this->getMock('Magento\\Backend\\Model\\Config\\Structure\\Element\\Dependency\\Mapper', [], [], '', false);
     $this->_cloneFactoryMock->expects($this->once())->method('create')->with('clone_model_name')->will($this->returnValue($cloneModel));
     $this->_model->setData(['clone_model' => 'clone_model_name'], 'scope');
     $this->assertEquals($cloneModel, $this->_model->getCloneModel());
 }