115 $this->_designMock = $this->
_makeMock(\
Magento\Framework\View\DesignInterface::class);
116 $this->_sessionMock = $this->
_makeMock(\
Magento\Framework\Session\Generic::class);
117 $this->_sidResolver = $this->
_makeMock(\
Magento\Framework\Session\SidResolver::class);
118 $this->_translatorMock = $this->
_makeMock(\
Magento\Framework\TranslateInterface::class);
119 $this->_layoutMock = $this->
_makeMock(\
Magento\Framework\View\Layout::class);
121 $this->_messagesMock = $this->
_makeMock(\
Magento\Framework\View\Element\Messages::class);
125 $this->_loggerMock = $this->
_makeMock(\Psr\Log\LoggerInterface::class);
126 $this->_filesystemMock = $this->
_makeMock(\
Magento\Framework\Filesystem::class);
128 $this->_scopeConfigMock = $this->
_makeMock(\
Magento\Framework\
App\Config\ScopeConfigInterface::class);
129 $this->_storeManagerMock = $this->
_makeMock(\
Magento\Store\Model\StoreManager::class);
130 $assetRepoMock = $this->
_makeMock(\
Magento\Framework\View\Asset\Repository::class);
131 $viewConfigMock = $this->
_makeMock(\
Magento\Framework\View\ConfigInterface::class);
132 $viewFileSystemMock = $this->
_makeMock(\
Magento\Framework\View\FileSystem::class);
133 $templatePoolMock = $this->
_makeMock(\
Magento\Framework\View\TemplateEnginePool::class);
134 $authorizationMock = $this->
_makeMock(\
Magento\Framework\AuthorizationInterface::class);
137 $filterManagerMock = $this->
_makeMock(\
Magento\Framework\Filter\FilterManager::class);
138 $backendSessionMock = $this->
_makeMock(\
Magento\Backend\Model\Session::class);
141 $this->_formKey = $this->
_makeMock(\
Magento\Framework\Data\Form\FormKey::class);
143 $appState->setAreaCode(\
Magento\Backend\
App\Area\FrontNameResolver::AREA_CODE);
145 $this->_translatorMock->expects(
150 $this->returnCallback([$this,
'translateCallback'])
153 $this->_context = new \Magento\Backend\Block\Template\Context(
156 $this->_eventManagerMock,
158 $this->_translatorMock,
163 $this->_scopeConfigMock,
164 $this->_controllerMock,
171 $this->_filesystemMock,
175 $this->_storeManagerMock,
191 return $this->getMockBuilder(
$className)->disableOriginalConstructor()->getMock();
205 \PHPUnit_Framework_MockObject_MockObject $object,
210 $expects = isset($expects) ? $expects : $this->any();
211 $return = isset($return) ? $this->returnValue($return) : $this->returnSelf();
213 return $object->expects($expects)->method($stubName)->will($return);
224 return $args[0]->getText();
_setStub(\PHPUnit_Framework_MockObject_MockObject $object, $stubName, $return=null, $expects=null)