riainvoice/vendor_old/omnipay/payfast/tests/Message/PurchaseResponseTest.php
2021-10-01 23:56:38 +05:30

25 lines
799 B
PHP

<?php
namespace Omnipay\PayFast\Message;
use Omnipay\Tests\TestCase;
class PurchaseResponseTest extends TestCase
{
public function testConstruct()
{
$data = array('test' => '123');
$response = new PurchaseResponse($this->getMockRequest(), $data, 'https://example.com/');
$this->assertFalse($response->isSuccessful());
$this->assertTrue($response->isRedirect());
$this->assertNull($response->getTransactionReference());
$this->assertNull($response->getMessage());
$this->assertSame($data, $response->getData());
$this->assertSame('https://example.com/', $response->getRedirectUrl());
$this->assertSame('POST', $response->getRedirectMethod());
$this->assertSame($data, $response->getRedirectData());
}
}