Skip to content

Commit

Permalink
core: Added fixed response to GakeCgrRpcClient
Browse files Browse the repository at this point in the history
  • Loading branch information
rbatistadev authored and mmadariaga committed Jan 27, 2023
1 parent b5c6716 commit 9c2296e
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion Infrastructure/Domain/Service/Cgrates/FakeCgrRpcClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,15 @@

class FakeCgrRpcClient implements ClientInterface
{

private $fixedResponse = '{"error": null}';

public function __construct(
string $fixedResponse = '{"error": null}'
) {
$this->fixedResponse = $fixedResponse;
}

public function notification($method, array $params = null)
{
return $this->createRequest();
Expand All @@ -30,7 +39,7 @@ public function send(RequestInterface $request)
return new Response(
200,
[],
'{"error": null}'
$this->fixedResponse
);
}

Expand Down

0 comments on commit 9c2296e

Please sign in to comment.