fix(service): make api endpoints configurable

This commit is contained in:
2024-08-04 15:15:12 +02:00
parent d6e56eed78
commit 1266195e24
9 changed files with 38 additions and 11 deletions

View File

@@ -55,7 +55,7 @@ qui aperiam non debitis possimus qui neque nisi nulla"
$response = new JsonMockResponse(self::API_POSTS_LIST);
$mockedClient = new MockHttpClient($response);
$briloApiPosts = new BriloApiPosts($mockedClient, $this->getLogger(), $serializer);
$briloApiPosts = new BriloApiPosts($mockedClient, $this->getLogger(), $serializer, 'http://nonexistent.local');
$this->assertEquals($testUserList, $briloApiPosts->getPosts());
}
@@ -73,7 +73,7 @@ qui aperiam non debitis possimus qui neque nisi nulla"
return $response;
});
$this->expectException(BriloRemoteApiException::class);
$briloApiPosts = new BriloApiPosts($mockedClient, $this->getLogger(), $serializer);
$briloApiPosts = new BriloApiPosts($mockedClient, $this->getLogger(), $serializer, 'http://nonexistent.local');
$briloApiPosts->getPosts();
}