forked from apoloz/alfa-bank-sdk
fix(formating)
This commit is contained in:
@@ -1,11 +1,10 @@
|
||||
<?php
|
||||
|
||||
use Apoloz\AlfaBank\Core\AlfaBankConnector;
|
||||
use Apoloz\AlfaBank\Core\AlfaConfig;
|
||||
use Apoloz\AlfaBank\Requests\SelfEmployed\GetActivitiesRequest;
|
||||
use Saloon\Http\Faking\MockResponse;
|
||||
|
||||
test('can get activities dictionary', function () {
|
||||
test('can get activities dictionary', function (): void {
|
||||
$mockClient = new \Saloon\Http\Faking\MockClient([
|
||||
GetActivitiesRequest::class => MockResponse::make([
|
||||
['id' => '1', 'name' => 'IT Services'],
|
||||
@@ -17,17 +16,17 @@ test('can get activities dictionary', function () {
|
||||
$connector = new AlfaBankConnector($config);
|
||||
$connector->withMockClient($mockClient);
|
||||
|
||||
$response = $connector->send(new GetActivitiesRequest());
|
||||
$response = $connector->send(new GetActivitiesRequest);
|
||||
|
||||
expect($response->status())->toBe(200)
|
||||
->and($response->dto()->count())->toBe(2)
|
||||
->and($response->dto()->first()->name)->toBe('IT Services');
|
||||
});
|
||||
|
||||
test('can get regions dictionary', function () {
|
||||
test('can get regions dictionary', function (): void {
|
||||
$mockClient = new \Saloon\Http\Faking\MockClient([
|
||||
\Apoloz\AlfaBank\Requests\SelfEmployed\GetRegionsRequest::class => \Saloon\Http\Faking\MockResponse::make([
|
||||
'regions' => [['code' => '77', 'name' => 'Москва']]
|
||||
'regions' => [['code' => '77', 'name' => 'Москва']],
|
||||
], 200),
|
||||
]);
|
||||
|
||||
@@ -36,9 +35,8 @@ test('can get regions dictionary', function () {
|
||||
$connector = new \Apoloz\AlfaBank\Core\AlfaBankConnector($config, $signer);
|
||||
$connector->withMockClient($mockClient);
|
||||
|
||||
$response = $connector->send(new \Apoloz\AlfaBank\Requests\SelfEmployed\GetRegionsRequest());
|
||||
$response = $connector->send(new \Apoloz\AlfaBank\Requests\SelfEmployed\GetRegionsRequest);
|
||||
|
||||
expect($response->status())->toBe(200)
|
||||
->and($response->json('regions.0.name'))->toBe('Москва');
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user