diff --git a/Infrastructure/Domain/Service/Cgrates/FakeCgrRpcClient.php b/Infrastructure/Domain/Service/Cgrates/FakeCgrRpcClient.php index 3ea1f05..284e24e 100644 --- a/Infrastructure/Domain/Service/Cgrates/FakeCgrRpcClient.php +++ b/Infrastructure/Domain/Service/Cgrates/FakeCgrRpcClient.php @@ -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(); @@ -30,7 +39,7 @@ public function send(RequestInterface $request) return new Response( 200, [], - '{"error": null}' + $this->fixedResponse ); }