24 $expectedGrandTotal = $this->productSimple->getPrice() + $this->shipping[
'price'];
25 $expectedGrandTotal = number_format($expectedGrandTotal, 2);
26 $actualGrandTotal = $this->checkoutCart->getTotalsBlock()->getGrandTotal();
28 if ($this->checkoutCart->getTotalsBlock()->isTaxVisible()) {
29 $errorMessages[] =
'Tax Rule \'' . $this->taxRuleCode .
'\' present in shopping cart.
'; 31 if ($expectedGrandTotal !== $actualGrandTotal) { 32 $errorMessages[] = 'Grand Total is not correct.
' 33 . "\nExpected: " . $expectedGrandTotal 34 . "\nActual: " . $actualGrandTotal; 37 \PHPUnit\Framework\Assert::assertTrue(empty($errorMessages), implode(";\n", $errorMessages)); 45 public function toString() 47 return "Tax rule was not applied on product in shopping cart.";