Skip to content

Commit 71980bd

Browse files
committed
WIP
1 parent ea65e68 commit 71980bd

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

tests/Feature/GetPublicListingTest.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,22 @@
33
namespace CodebarAg\FlatFox\Tests\Feature;
44

55
use CodebarAg\Flatfox\Requests\GetPublicListing;
6+
use Saloon\Http\Faking\MockClient;
7+
use Saloon\Http\Faking\MockResponse;
68

79
it('get public listing', function () {
10+
11+
$mockClient = new MockClient([
12+
GetPublicListing::class => MockResponse::fixture('get-public-listing-request'),
13+
]);
14+
815
$request = new GetPublicListing(142, '&expand=documents&expand=images');
16+
$request->withMockClient($mockClient);
17+
918
$response = $request->send();
19+
20+
$mockClient->assertSent(GetPublicListing::class);
21+
1022
expect($response->status())->toBe(200)
1123
->and($response->dto())->not()->toBeEmpty();
1224
})

tests/Fixtures/Saloon/get-public-listing-request.json

Lines changed: 1 addition & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)