diff --git a/src/Utopia/Messaging/Adapter/SMS/Mock.php b/src/Utopia/Messaging/Adapter/SMS/Mock.php index 9f39cd3..ee14160 100644 --- a/src/Utopia/Messaging/Adapter/SMS/Mock.php +++ b/src/Utopia/Messaging/Adapter/SMS/Mock.php @@ -10,6 +10,8 @@ class Mock extends SMSAdapter { protected const NAME = 'Mock'; + protected string $url = 'http://request-catcher:5000/mock-sms'; + /** * @param string $user User ID * @param string $secret User secret @@ -25,6 +27,17 @@ public function getName(): string return static::NAME; } + public function getEndpoint(): string + { + return $this->url; + } + + public function setEndpoint(string $url): self + { + $this->url = $url; + return $this; + } + public function getMaxMessagesPerRequest(): int { return 1000; @@ -43,7 +56,7 @@ protected function process(SMSMessage $message): array $result = $this->request( method: 'POST', - url: 'http://request-catcher:5000/mock-sms', + url: $this->url, headers: [ 'Content-Type: application/json', "X-Username: {$this->user}",