Browse code

Added README.md appinfo/info.xml appinfo/signature.json lib/Controller/AuthorApiController.php and the providers directory

DoubleBastionAdmin authored on 20/08/2022 16:33:00
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,28 @@
1
+<?php
2
+
3
+namespace Telnyx;
4
+
5
+class MessageTest extends TestCase
6
+{
7
+    const TEST_MESSAGING_PROFILE_ID = "d120432d-2e77-4583-87f8-1db837cee559";
8
+    const TEST_SRC_LONG_CODE = "+13125550100";
9
+    const TEST_SRC_ALPHANUMERIC = "Testing 123";
10
+    const TEST_DST = "+17735550100";
11
+    const TEST_MESSAGE_BODY = "Hello!";
12
+
13
+    public function testCanCreateStandardMessage()
14
+    {
15
+        $this->expectsRequest(
16
+            'post',
17
+            '/v2/messages'
18
+        );
19
+
20
+        $resource = \Telnyx\Message::Create([
21
+            "from" => static::TEST_SRC_LONG_CODE,
22
+            "to" => static::TEST_DST,
23
+            "text" => static::TEST_MESSAGE_BODY
24
+        ]);
25
+
26
+        $this->assertInstanceOf(\Telnyx\Message::class, $resource);
27
+    }
28
+}