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

@@ -57,7 +57,7 @@ nihil sint nostrum voluptatem reiciendis et"
$response = new JsonMockResponse(self::API_COMMENTS_LIST);
$mockedClient = new MockHttpClient($response);
$briloApiPosts = new BriloApiComments($mockedClient, $this->getLogger(), $serializer);
$briloApiPosts = new BriloApiComments($mockedClient, $this->getLogger(), $serializer, 'http://nonexistent.local/');
$this->assertEquals($testCommentsList, $briloApiPosts->getComments());
}
@@ -75,7 +75,7 @@ nihil sint nostrum voluptatem reiciendis et"
return $response;
});
$this->expectException(BriloRemoteApiException::class);
$briloApiPosts = new BriloApiComments($mockedClient, $this->getLogger(), $serializer);
$briloApiPosts = new BriloApiComments($mockedClient, $this->getLogger(), $serializer, 'http://nonexistent.local');
$briloApiPosts->getComments();
}