Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
AssertMinicartItemsQty.php
Go to the documentation of this file.
1 <?php
8 
9 use Magento\Cms\Test\Page\CmsIndex;
10 use Magento\Mtf\Constraint\AbstractConstraint;
11 
15 class AssertMinicartItemsQty extends AbstractConstraint
16 {
24  public function processAssert(
25  CmsIndex $cmsIndex,
26  $expectedItemsQty
27  ) {
28  $cmsIndex->open();
29  \PHPUnit\Framework\Assert::assertSame(
30  (int)$expectedItemsQty,
31  $cmsIndex->getCartSidebarBlock()->getItemsQty(),
32  'The quantity of items in shopping cart is not correct.'
33  );
34  }
35 
41  public function toString()
42  {
43  return 'The quantity of items in mini shopping cart is correct.';
44  }
45 }