wp-pay-gateways /
buckaroo
| 1 | <?php |
||
| 2 | /** |
||
| 3 | * Client test |
||
| 4 | * |
||
| 5 | * @author Pronamic <[email protected]> |
||
| 6 | * @copyright 2005-2021 Pronamic |
||
| 7 | * @license GPL-3.0-or-later |
||
| 8 | * @package Pronamic\WordPress\Pay\Gateways\Buckaroo |
||
| 9 | */ |
||
| 10 | |||
| 11 | namespace Pronamic\WordPress\Pay\Gateways\Buckaroo; |
||
| 12 | |||
| 13 | use Pronamic\WordPress\Http\Factory; |
||
| 14 | use WP_Error; |
||
| 15 | use WP_Http; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * Title: Buckaroo client tests |
||
| 19 | * Description: |
||
| 20 | * Copyright: 2005-2021 Pronamic |
||
| 21 | * Company: Pronamic |
||
| 22 | * |
||
| 23 | * @author Remco Tolsma |
||
| 24 | * @version 2.0.4 |
||
| 25 | */ |
||
| 26 | class ClientTest extends \WP_UnitTestCase { |
||
| 27 | /** |
||
| 28 | * Setup. |
||
| 29 | */ |
||
| 30 | public function setUp() { |
||
| 31 | parent::setUp(); |
||
| 32 | |||
| 33 | $this->factory = new Factory(); |
||
|
0 ignored issues
–
show
Bug
Best Practice
introduced
by
Loading history...
|
|||
| 34 | } |
||
| 35 | |||
| 36 | /** |
||
| 37 | * Test client. |
||
| 38 | */ |
||
| 39 | public function test_client() { |
||
| 40 | $client = new Client(); |
||
| 41 | $client->set_website_key( getenv( 'BUCKAROO_WEBSITE_KEY' ) ); |
||
| 42 | $client->set_secret_key( getenv( 'BUCKAROO_SECRET_KEY' ) ); |
||
| 43 | |||
| 44 | $this->factory->fake( 'https://testcheckout.buckaroo.nl/nvp/?op=TransactionRequestSpecification', __DIR__ . '/../http/testcheckout-buckaroo-nl-nvp-op-TransactionRequestSpecification-ok.http' ); |
||
| 45 | |||
| 46 | $issuers = $client->get_issuers(); |
||
| 47 | |||
| 48 | $this->assertInternalType( 'array', $issuers ); |
||
| 49 | } |
||
| 50 | } |
||
| 51 |