Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
AssertEmailToolTips.php
Go to the documentation of this file.
1 <?php
8 
9 use Magento\Checkout\Test\Page\CheckoutOnepage;
10 use Magento\Mtf\Constraint\AbstractConstraint;
11 
15 class AssertEmailToolTips extends AbstractConstraint
16 {
20  const EMAIL_TOOLTIP = 'We\'ll send your order confirmation here.';
21 
25  const EMAIL_INSTRUCTIONS = 'You can create an account after checkout.';
26 
33  public function processAssert(
34  CheckoutOnepage $checkoutOnepage
35  ) {
36  \PHPUnit\Framework\Assert::assertEquals(
37  self::EMAIL_TOOLTIP,
38  $checkoutOnepage->getShippingBlock()->getEmailTooltip(),
39  'Email tooltip is not correct.'
40  );
41 
42  \PHPUnit\Framework\Assert::assertEquals(
43  self::EMAIL_INSTRUCTIONS,
44  $checkoutOnepage->getShippingBlock()->getEmailInstructions(),
45  'Email instructions are not correct.'
46  );
47  }
48 
54  public function toString()
55  {
56  return 'Email field tooltips are present.';
57  }
58 }