示例#1
0
 public function setUp()
 {
     parent::setUp();
     $this->filesystemMock = $this->basicMock('\\Magento\\Framework\\Filesystem');
     $this->databaseMock = $this->basicMock('\\Magento\\Core\\Helper\\File\\Storage\\Database');
     $this->model = $this->objectManager->getObject('Magento\\Core\\Model\\Asset\\Plugin\\CleanMergedJsCss', ['database' => $this->databaseMock, 'filesystem' => $this->filesystemMock]);
 }
示例#2
0
 public function setUp()
 {
     parent::setUp();
     $this->configMock = $this->basicMock('Magento\\Framework\\App\\Config\\ScopeConfigInterface');
     $requestMethods = ['getActionName', 'getModuleName', 'getParam', 'setActionName', 'setModuleName', 'setControllerName', 'getCookie'];
     $this->requestMock = $this->getMock('Magento\\Framework\\App\\RequestInterface', $requestMethods);
     $this->model = $this->objectManager->getObject('Magento\\Core\\App\\Router\\NoRouteHandler', ['config' => $this->configMock]);
 }
示例#3
0
 public function setUp()
 {
     parent::setUp();
     // Create mocks
     $requestMethods = ['getActionName', 'getModuleName', 'getParam', 'setActionName', 'setModuleName', 'setRouteName', 'getPathInfo', 'getControllerName', 'setControllerName', 'setControllerModule', 'setAlias', 'getCookie', 'getOriginalPathInfo', 'getPost', 'isSecure', 'setParams'];
     $this->requestMock = $this->getMock('Magento\\Framework\\App\\RequestInterface', $requestMethods);
     $this->routeConfigMock = $this->basicMock('Magento\\Framework\\App\\Route\\ConfigInterface');
     $this->appStateMock = $this->basicMock('Magento\\Framework\\App\\State');
     $this->actionListMock = $this->basicMock('Magento\\Framework\\App\\Router\\ActionList');
     $this->actionFactoryMock = $this->basicMock('Magento\\Framework\\App\\ActionFactory');
     $this->nameBuilderMock = $this->basicMock('Magento\\Framework\\Code\\NameBuilder');
     $this->defaultPathMock = $this->basicMock('Magento\\Framework\\App\\DefaultPathInterface');
     // Prepare SUT
     $mocks = ['actionList' => $this->actionListMock, 'actionFactory' => $this->actionFactoryMock, 'routeConfig' => $this->routeConfigMock, 'appState' => $this->appStateMock, 'nameBuilder' => $this->nameBuilderMock, 'defaultPath' => $this->defaultPathMock];
     $this->model = $this->objectManager->getObject('Magento\\Core\\App\\Router\\Base', $mocks);
 }
示例#4
0
 public function setUp()
 {
     parent::setUp();
     $this->scopeConfigMock = $this->basicMock('Magento\\Framework\\App\\Config\\ScopeConfigInterface');
     $this->model = $this->objectManager->getObject('Magento\\Core\\Model\\Asset\\Config', ['scopeConfig' => $this->scopeConfigMock]);
 }