public function testGetConfig() { $loginUrl = 'http://base-url.test/customer/login'; $baseUrl = 'http://base-url.test'; $this->urlBuilder->expects($this->exactly(2))->method('getUrl')->with(Url::ROUTE_ACCOUNT_LOGIN)->willReturn($loginUrl); $this->storeManager->expects($this->once())->method('getStore')->willReturn($this->store); $this->store->expects($this->once())->method('getBaseUrl')->willReturn($baseUrl); $this->scopeConfig->expects($this->once())->method('getValue')->with(Form::XML_PATH_ENABLE_AUTOCOMPLETE, ScopeInterface::SCOPE_STORE)->willReturn(0); $this->assertEquals(['customerLoginUrl' => $loginUrl, 'isRedirectRequired' => false, 'autocomplete' => 'off'], $this->provider->getConfig()); }
/** * @param \Magento\Checkout\Block\Cart\Sidebar $subject * @param array $result * @return array * * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function afterGetConfig(\Magento\Checkout\Block\Cart\Sidebar $subject, array $result) { return array_merge_recursive($result, $this->configProvider->getConfig()); }