public function testGetWelcomeDefault() { $this->scopeConfig->expects($this->once())->method('getValue')->with('design/header/welcome', \Magento\Store\Model\ScopeInterface::SCOPE_STORE)->willReturn('Welcome Message'); $this->assertEquals('Welcome Message', $this->unit->getWelcome()); }
/** * Test welcome message when customer is logged in */ public function testGetWelcomeLoggedIn() { $this->context->setValue(\Magento\Customer\Helper\Data::CONTEXT_AUTH, true, false); $this->assertEquals('Welcome, Firstname Lastname!', $this->block->getWelcome()); }
/** * Test welcome message when customer is logged in */ public function testGetWelcomeLoggedIn() { $this->context->setValue(Context::CONTEXT_AUTH, true, false); $this->assertEquals('Welcome, John Smith!', $this->block->getWelcome()); }