forked from apoloz/alfa-bank-sdk
fix(formating)
This commit is contained in:
@@ -9,11 +9,11 @@ use Apoloz\AlfaBank\Requests\Registries\SignRegistryRequest;
|
||||
use Saloon\Http\Faking\MockResponse;
|
||||
use Spatie\LaravelData\DataCollection;
|
||||
|
||||
test('can create payment registry', function () {
|
||||
test('can create payment registry', function (): void {
|
||||
$mockClient = new \Saloon\Http\Faking\MockClient([
|
||||
CreateRegistryRequest::class => MockResponse::make([
|
||||
'id' => 'REG-123',
|
||||
'status' => 'CREATED'
|
||||
'status' => 'CREATED',
|
||||
], 201),
|
||||
]);
|
||||
|
||||
@@ -31,8 +31,8 @@ test('can create payment registry', function () {
|
||||
'payeeInn' => '770...',
|
||||
'payeeName' => 'Recipient LLC',
|
||||
'payerAccount' => '40702...',
|
||||
'purpose' => 'Payment'
|
||||
]
|
||||
'purpose' => 'Payment',
|
||||
],
|
||||
], DataCollection::class)
|
||||
);
|
||||
|
||||
@@ -42,7 +42,7 @@ test('can create payment registry', function () {
|
||||
->and($response->json('id'))->toBe('REG-123');
|
||||
});
|
||||
|
||||
test('can sign payment registry', function () {
|
||||
test('can sign payment registry', function (): void {
|
||||
$mockClient = new \Saloon\Http\Faking\MockClient([
|
||||
SignRegistryRequest::class => MockResponse::make([], 200),
|
||||
]);
|
||||
@@ -55,8 +55,8 @@ test('can sign payment registry', function () {
|
||||
[
|
||||
'base64Encoded' => 'SIG...',
|
||||
'signatureType' => 'RSA',
|
||||
'certificateUuid' => 'CERT-123'
|
||||
]
|
||||
'certificateUuid' => 'CERT-123',
|
||||
],
|
||||
], DataCollection::class);
|
||||
|
||||
$response = $connector->send(new \Apoloz\AlfaBank\Requests\Registries\SignRegistryRequest('reg-1', \Apoloz\AlfaBank\Data\Registries\RegistrySignatureData::collect([], \Spatie\LaravelData\DataCollection::class)));
|
||||
@@ -64,7 +64,7 @@ test('can sign payment registry', function () {
|
||||
expect($response->status())->toBe(200);
|
||||
});
|
||||
|
||||
test('can get registry details', function () {
|
||||
test('can get registry details', function (): void {
|
||||
$mockClient = new \Saloon\Http\Faking\MockClient([
|
||||
\Apoloz\AlfaBank\Requests\Registries\GetRegistryRequest::class => \Saloon\Http\Faking\MockResponse::make(['id' => 'reg-1'], 200),
|
||||
\Apoloz\AlfaBank\Requests\Registries\GetRegistryPaymentsRequest::class => \Saloon\Http\Faking\MockResponse::make(['payments' => []], 200),
|
||||
@@ -81,4 +81,3 @@ test('can get registry details', function () {
|
||||
$response = $connector->send(new \Apoloz\AlfaBank\Requests\Registries\GetRegistryPaymentsRequest('reg-1'));
|
||||
expect($response->status())->toBe(200);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user