Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
AssertSalesPrintOrderGrandTotal.php
Go to the documentation of this file.
1 <?php
8 
9 use Magento\Sales\Test\Page\SalesGuestPrint;
10 use Magento\Mtf\Constraint\AbstractConstraint;
11 
15 class AssertSalesPrintOrderGrandTotal extends AbstractConstraint
16 {
24  public function processAssert(SalesGuestPrint $salesGuestPrint, array $prices)
25  {
26  \PHPUnit\Framework\Assert::assertEquals(
27  number_format(array_sum($prices), 2),
28  $salesGuestPrint->getViewBlock()->getItemBlock()->getGrandTotal(),
29  "Grand total was printed incorrectly."
30  );
31  }
32 
38  public function toString()
39  {
40  return "Grand total was printed correctly.";
41  }
42 }