Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
AssertSubtotalInMiniShoppingCart.php
Go to the documentation of this file.
1 <?php
8 
10 use Magento\Cms\Test\Page\CmsIndex;
12 
17 {
25  public function processAssert(CmsIndex $cmsIndex, Cart $cart)
26  {
27  $cmsIndex->open();
28  $fixtureSubtotal = number_format($cart->getSubtotal(), 2);
29  $miniCartSubtotal = $cmsIndex->getCartSidebarBlock()->getSubtotal();
30  \PHPUnit\Framework\Assert::assertEquals(
31  $fixtureSubtotal,
32  $miniCartSubtotal,
33  'Subtotal price in mini shopping cart is not equal to subtotal price from fixture.'
34  );
35  }
36 
42  public function toString()
43  {
44  return 'Subtotal in mini shopping cart equals to expected subtotal from data set.';
45  }
46 }