Skip to content

Commit

Permalink
XOL-3125 Add unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
rushi committed Sep 30, 2016
1 parent d09ce42 commit 3aebd9b
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tests/Message/RefundRequestTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@

class RefundRequestTest extends TestCase
{
/** @var RefundRequest $request */
private $request;

public function setUp()
{
$this->request = new RefundRequest($this->getHttpClient(), $this->getHttpRequest());
Expand All @@ -30,6 +33,16 @@ public function testRefundApplicationFee()
$this->assertEquals("true", $data['refund_application_fee']);
}

public function testShouldSetReverseTransferFlag()
{
$this->request->setTransactionReference('ch_12RgN9L7XhO9mI')->setAmount('10.00');
$this->request->setReverseTransfer(true);

$data = $this->request->getData();

$this->assertEquals("true", $data['reverse_transfer']);
}

public function testSendSuccess()
{
$this->setMockHttpResponse('RefundSuccess.txt');
Expand Down

0 comments on commit 3aebd9b

Please sign in to comment.