Пример #1
0
 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());
 }
Пример #2
0
 /**
  * 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());
 }
Пример #3
0
 /**
  * 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());
 }