Beispiel #1
0
 public function testGetUserEmail()
 {
     $this->_customerSession->expects($this->once())->method('isLoggedIn')->will($this->returnValue(true));
     $customerDataObject = $this->getMock('\\Magento\\Customer\\Api\\Data\\CustomerInterface', [], [], '', false);
     $customerDataObject->expects($this->once())->method('getEmail')->will($this->returnValue('*****@*****.**'));
     $this->_customerSession->expects($this->once())->method('getCustomerDataObject')->will($this->returnValue($customerDataObject));
     $this->assertEquals('*****@*****.**', $this->_helper->getUserEmail());
 }
 /**
  * Verify if user email is set in session
  */
 public function testGetEmail()
 {
     $this->assertEquals('*****@*****.**', $this->contactsHelper->getUserEmail());
 }