Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
AssertTopDestinationsInSelect.php
Go to the documentation of this file.
1 <?php
8 
9 use Magento\Checkout\Test\Page\CheckoutCart;
10 use Magento\Mtf\Constraint\AbstractConstraint;
11 
15 class AssertTopDestinationsInSelect extends AbstractConstraint
16 {
24  public function processAssert(CheckoutCart $checkoutCart, array $topDestinations)
25  {
26  $checkoutCart->open();
27  \PHPUnit\Framework\Assert::assertEquals(
28  $topDestinations,
29  $checkoutCart->getShippingBlock()->getTopCountries(),
30  'Top countries are different from the ones selected as Top Destinations.'
31  );
32  }
33 
39  public function toString()
40  {
41  return 'Countries selected as Top Destinations are at the top in select.';
42  }
43 }
processAssert(CheckoutCart $checkoutCart, array $topDestinations)