/** * Assert release success message is displayed on order index page * * @param OrderIndex $orderIndex * @param int $ordersCount * @return void */ public function processAssert(OrderIndex $orderIndex, $ordersCount) { \PHPUnit_Framework_Assert::assertEquals(sprintf(self::SUCCESS_RELEASE_MESSAGE, $ordersCount), $orderIndex->getMessagesBlock()->getSuccessMessages()); }
/** * Assert cancel fail message is displayed on order index page * * @param OrderIndex $orderIndex * @return void */ public function processAssert(OrderIndex $orderIndex) { \PHPUnit_Framework_Assert::assertEquals(self::FAIL_CANCEL_MESSAGE, $orderIndex->getMessagesBlock()->getErrorMessage()); }
/** * Assert on hold success message is displayed on order index page * * @param OrderIndex $orderIndex * @param int $ordersCount * @return void */ public function processAssert(OrderIndex $orderIndex, $ordersCount = null) { $successOnHoldMessage = $ordersCount > 1 ? sprintf(self::MULTIPLE_SUCCESS_ON_HOLD_MESSAGE, $ordersCount) : self::SINGLE_SUCCESS_ON_HOLD_MESSAGE; \PHPUnit_Framework_Assert::assertEquals($successOnHoldMessage, $orderIndex->getMessagesBlock()->getSuccessMessages()); }