MockResponse::make(['bonusNumbers' => []], 200), ]); $config = createTestConfig(); $connector = new AlfaBankConnector($config); $connector->withMockClient($mockClient); $response = $connector->send(new GetBonusNumbersRequest()); expect($response->status())->toBe(200); }); test('can get credit offers', function () { $mockClient = new \Saloon\Http\Faking\MockClient([ GetCreditOffersRequest::class => MockResponse::make(['offers' => []], 200), ]); $config = createTestConfig(); $connector = new AlfaBankConnector($config); $connector->withMockClient($mockClient); $response = $connector->send(new GetCreditOffersRequest()); expect($response->status())->toBe(200); }); test('can create self-encashment registry', function () { $mockClient = new \Saloon\Http\Faking\MockClient([ CreateSelfEncashmentRegistryRequest::class => MockResponse::make([], 201), ]); $config = createTestConfig(); $connector = new AlfaBankConnector($config); $connector->withMockClient($mockClient); $response = $connector->send(new CreateSelfEncashmentRegistryRequest(new \Apoloz\AlfaBank\Data\Registries\SelfEncashmentData([]))); expect($response->status())->toBe(201); });