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

22 lines
757 B
PHP

<?php
namespace Omnipay\TwoCheckout\Message;
use Omnipay\Tests\TestCase;
class PurchaseResponseTest extends TestCase
{
public function testConstruct()
{
$response = new Purchaseresponse($this->getMockRequest(), array('sid' => '12345', 'total' => '10.00'));
$this->assertFalse($response->isSuccessful());
$this->assertTrue($response->isRedirect());
$this->assertNull($response->getTransactionReference());
$this->assertNull($response->getMessage());
$this->assertSame('https://www.2checkout.com/checkout/purchase?sid=12345&total=10.00', $response->getRedirectUrl());
$this->assertSame('GET', $response->getRedirectMethod());
$this->assertNull($response->getRedirectData());
}
}