Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
AssertTotalPaypalReview.php
Go to the documentation of this file.
1 <?php
8 
9 use Magento\Paypal\Test\Page\Sandbox\ExpressReview;
10 use Magento\Mtf\Constraint\AbstractConstraint;
11 
15 class AssertTotalPaypalReview extends AbstractConstraint
16 {
24  public function processAssert(ExpressReview $expressReview, $total)
25  {
26  $reviewTotal = $expressReview->getExpressMainReviewBlock()->getReviewBlock()->getTotal();
27 
28  \PHPUnit\Framework\Assert::assertEquals(
29  $reviewTotal,
30  number_format($total, 2),
31  'Total price: \'' . $reviewTotal
32  . '\' not equals with price from data set: \'' . $total . '\''
33  );
34  }
35 
41  public function toString()
42  {
43  return 'Total price equals to price from data set.';
44  }
45 }