File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed
src/Utopia/Messaging/Adapter/SMS Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,8 @@ class Mock extends SMSAdapter
1010{
1111 protected const NAME = 'Mock ' ;
1212
13+ protected string $ url = 'http://request-catcher:5000/mock-sms ' ;
14+
1315 /**
1416 * @param string $user User ID
1517 * @param string $secret User secret
@@ -25,6 +27,17 @@ public function getName(): string
2527 return static ::NAME ;
2628 }
2729
30+ public function getEndpoint (): string
31+ {
32+ return $ this ->url ;
33+ }
34+
35+ public function setEndpoint (string $ url ): self
36+ {
37+ $ this ->url = $ url ;
38+ return $ this ;
39+ }
40+
2841 public function getMaxMessagesPerRequest (): int
2942 {
3043 return 1000 ;
@@ -43,7 +56,7 @@ protected function process(SMSMessage $message): array
4356
4457 $ result = $ this ->request (
4558 method: 'POST ' ,
46- url: ' http://request-catcher:5000/mock-sms ' ,
59+ url: $ this -> url ,
4760 headers: [
4861 'Content-Type: application/json ' ,
4962 "X-Username: {$ this ->user }" ,
You can’t perform that action at this time.
0 commit comments