From f2a35333c1772a8015663543dbbaa9645fa55478 Mon Sep 17 00:00:00 2001 From: Stefan Kleff Date: Thu, 4 Feb 2016 12:40:10 +0100 Subject: [PATCH] added test --- .../Action/PaymentDetailsStatusActionTest.php | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/Tests/Action/PaymentDetailsStatusActionTest.php b/Tests/Action/PaymentDetailsStatusActionTest.php index bad2365..f8813c3 100644 --- a/Tests/Action/PaymentDetailsStatusActionTest.php +++ b/Tests/Action/PaymentDetailsStatusActionTest.php @@ -407,4 +407,22 @@ public function shouldMarkUnknownIfPaymentStatusUnknown() $this->assertTrue($request->isUnknown()); } + + + /** + * @test + */ + public function shouldMarkCanceledIfPaymentIsCancelledByUser() + { + $action = new PaymentDetailsStatusAction(); + + $request = new GetHumanStatus(array( + 'CHECKOUTSTATUS' => Api::CHECKOUTSTATUS_PAYMENT_ACTION_NOT_INITIATED, + 'CANCELLED' => true, + )); + + $action->execute($request); + + $this->assertTrue($request->isCanceled()); + } }