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