protected function setUp() { $this->objectManagerHelper = new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this); $this->requestMock = $this->getMock('Magento\\Framework\\App\\Request\\Http', ['getRequestString', 'getModuleName', 'setModuleName', 'getActionName', 'setActionName', 'getParam', 'getQueryValue', 'getDistroBaseUrl', 'isSecure', 'getServer'], [], '', false); $this->filesystemMock = $this->getMockBuilder('Magento\\Framework\\Filesystem')->disableOriginalConstructor()->getMock(); $this->store = $this->objectManagerHelper->getObject('Magento\\Store\\Model\\Store', ['filesystem' => $this->filesystemMock]); $this->urlModifierMock = $this->getMock('Magento\\Framework\\Url\\ModifierInterface'); $this->urlModifierMock->expects($this->any())->method('execute')->willReturnArgument(0); }
protected function setUp() { $this->routeParamsResolverMock = $this->getMock('Magento\\Framework\\Url\\RouteParamsResolver', ['getType', 'hasData', 'getData', 'getRouteParams'], [], '', false); $this->routeParamsPreprocessorMock = $this->getMockForAbstractClass('Magento\\Framework\\Url\\RouteParamsPreprocessorInterface', [], '', false, true, true, []); $this->scopeResolverMock = $this->getMock('Magento\\Framework\\Url\\ScopeResolverInterface'); $this->scopeMock = $this->getMock('Magento\\Framework\\Url\\ScopeInterface'); $this->queryParamsResolverMock = $this->getMock('Magento\\Framework\\Url\\QueryParamsResolverInterface', [], [], '', false); $this->sidResolverMock = $this->getMock('Magento\\Framework\\Session\\SidResolverInterface'); $this->sessionMock = $this->getMock('Magento\\Framework\\Session\\Generic', [], [], '', false); $this->scopeConfig = $this->getMock('\\Magento\\Framework\\App\\Config\\ScopeConfigInterface'); $this->urlModifier = $this->getMock('Magento\\Framework\\Url\\ModifierInterface'); $this->urlModifier->expects($this->any())->method('execute')->willReturnArgument(0); }