Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
AssertTaxTotalOrderReview.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 AssertTaxTotalOrderReview extends AbstractConstraint
16 {
24  public function processAssert(CheckoutOnepage $checkoutOnepage, $taxTotal)
25  {
26  $reviewTaxTotal = $checkoutOnepage->getReviewBlock()->getTax();
27 
28  \PHPUnit\Framework\Assert::assertEquals(
29  $reviewTaxTotal,
30  number_format($taxTotal, 2),
31  "Tax price '$reviewTaxTotal' not equals with price from data set '$taxTotal'."
32  );
33  }
34 
40  public function toString()
41  {
42  return 'Tax price equals to price from data set.';
43  }
44 }
processAssert(CheckoutOnepage $checkoutOnepage, $taxTotal)