From c6d524f82934e7238c7850f3e89891d8d0c93062 Mon Sep 17 00:00:00 2001 From: Craig Paul Date: Thu, 20 Oct 2016 10:38:36 -0600 Subject: [PATCH] Adds void transaction test --- tests/GatewayTest.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/GatewayTest.php b/tests/GatewayTest.php index 373944b..aee22ad 100644 --- a/tests/GatewayTest.php +++ b/tests/GatewayTest.php @@ -84,4 +84,14 @@ public function it_can_verify_a_card_before_attempting_a_purchase_and_receive_a_ $this->assertEquals(Response::class, get_class($response)); $this->assertTrue($response->successful); } + + /** @test */ + public function it_can_void_a_transaction_after_making_a_purchase_and_receive_a_response() + { + $response = $this->gateway->purchase($this->params); + $response = $this->gateway->void($response->transaction); + + $this->assertEquals(Response::class, get_class($response)); + $this->assertTrue($response->successful); + } } \ No newline at end of file