コード例 #1
0
 /**
  * Check that Shopping Cart is empty, opened page contains text "You have no items in your shopping cart.
  * Click here to continue shopping." where 'here' is link that leads to index page
  *
  * @param CheckoutCart $checkoutCart
  * @param BrowserInterface $browser
  * @return void
  */
 public function processAssert(CheckoutCart $checkoutCart, BrowserInterface $browser)
 {
     $checkoutCart->open();
     $cartEmptyBlock = $checkoutCart->getCartEmptyBlock();
     \PHPUnit_Framework_Assert::assertEquals(self::TEXT_EMPTY_CART, $cartEmptyBlock->getText(), 'Wrong text on empty cart page.');
     $cartEmptyBlock->clickLinkToMainPage();
     \PHPUnit_Framework_Assert::assertEquals($_ENV['app_frontend_url'], $browser->getUrl(), 'Wrong link to main page on empty cart page.');
 }