forked from apoloz/alfa-bank-sdk
first commit
This commit is contained in:
24
tests/Feature/NominalAccounts/NominalAccountsTest.php
Normal file
24
tests/Feature/NominalAccounts/NominalAccountsTest.php
Normal file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
use Gemini\AlfaBank\AlfaBankConnector;
|
||||
use Gemini\AlfaBank\Requests\NominalAccounts\GetNominalAccountsRequest;
|
||||
use Saloon\Http\Faking\MockResponse;
|
||||
|
||||
test('can list nominal accounts', function () {
|
||||
$mockClient = new \Saloon\Http\Faking\MockClient([
|
||||
GetNominalAccountsRequest::class => MockResponse::make([
|
||||
[
|
||||
'accountNumber' => '40817810306050000000',
|
||||
'isActive' => true
|
||||
]
|
||||
], 200),
|
||||
]);
|
||||
|
||||
$connector = new AlfaBankConnector('cert.pem', 'key.pem');
|
||||
$connector->withMockClient($mockClient);
|
||||
|
||||
$response = $connector->send(new GetNominalAccountsRequest());
|
||||
|
||||
expect($response->status())->toBe(200)
|
||||
->and($response->dto()->first()->accountNumber)->toBe('40817810306050000000');
|
||||
});
|
||||
Reference in New Issue
Block a user