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