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

44 lines
923 B
PHP

<?php
namespace Omnipay\TargetPay\Message;
use Omnipay\Tests\TestCase;
class FetchIssuersRequestTest extends TestCase
{
/**
* @var FetchIssuersRequest
*/
private $request;
protected function setUp()
{
$this->request = new FetchIssuersRequest($this->getHttpClient(), $this->getHttpRequest());
}
/**
* @dataProvider issuersProvider
*/
public function testSendSuccess($expected)
{
$this->setMockHttpResponse('FetchIssuersSuccess.txt');
$response = $this->request->send();
$this->assertTrue($response->isSuccessful());
$this->assertEquals($expected, $response->getIssuers());
}
public function issuersProvider()
{
return array(
array(
array(
'0001' => 'Sample 1',
'0002' => 'Sample 2',
),
),
);
}
}