Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Public Member Functions | Protected Attributes
DataTest Class Reference
Inheritance diagram for DataTest:

Public Member Functions

 testGetUserName ()
 
 testGetEmail ()
 

Protected Attributes

 $contactsHelper
 
 $customerSession
 

Detailed Description

Test for Magento\Contact\Helper\Data

@magentoDataFixture Magento/Customer/_files/customer.php

Definition at line 16 of file DataTest.php.

Member Function Documentation

◆ testGetEmail()

testGetEmail ( )

Verify if user email is set in session

Definition at line 57 of file DataTest.php.

58  {
59  $this->assertEquals('[email protected]', $this->contactsHelper->getUserEmail());
60  }

◆ testGetUserName()

testGetUserName ( )

Verify if username is set in session

Definition at line 49 of file DataTest.php.

50  {
51  $this->assertEquals('John Smith', $this->contactsHelper->getUserName());
52  }

Field Documentation

◆ $contactsHelper

$contactsHelper
protected

Definition at line 21 of file DataTest.php.

◆ $customerSession

$customerSession
protected

Definition at line 26 of file DataTest.php.


The documentation for this class was generated from the following file: