fix(service): make api endpoints configurable
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user