/** * Review order on PayPal side and continue. * * @return void */ public function run() { $this->expressReview->getExpressLoginBlock()->waitForFormLoaded(); if ($this->expressReview->getExpressMainLoginBlock()->isVisible()) { $this->expressReview->getExpressMainLoginBlock()->getLoginBlock()->fill($this->sandboxCustomer); $this->expressReview->getExpressMainLoginBlock()->getLoginBlock()->sandboxLogin(); } if (isset($this->paypalPrices['total'])) { $this->assertTotalPaypalReview->processAssert($this->expressReview, $this->paypalPrices['total']); } $this->expressReview->getExpressMainReviewBlock()->getReviewBlock()->reviewAndContinue(); }
/** * Assert that Order Grand Total is correct on PayPal page. * * @param ExpressReview $expressReview * @param string $total * @return void */ public function processAssert(ExpressReview $expressReview, $total) { $reviewTotal = $expressReview->getExpressMainReviewBlock()->getReviewBlock()->getTotal(); \PHPUnit_Framework_Assert::assertEquals($reviewTotal, number_format($total, 2), 'Total price: \'' . $reviewTotal . '\' not equals with price from data set: \'' . $total . '\''); }