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,48 @@
1
+<?php
2
+
3
+namespace Telnyx;
4
+
5
+/**
6
+ * @internal
7
+ * @covers \Telnyx\MessagingPhoneNumber
8
+ * @deprecated Tests are expected to fail even though this endpoint currently is working in production.
9
+ */
10
+final class MessagingPhoneNumberTest extends \Telnyx\TestCase
11
+{
12
+    const TEST_RESOURCE_ID = '+18005554000';
13
+
14
+    public function testIsListable()
15
+    {
16
+        $this->expectException('Telnyx\Exception\UnexpectedValueException');
17
+        
18
+        $this->expectsRequest(
19
+            'get',
20
+            '/v2/messaging_phone_numbers'
21
+        );
22
+        $resources = MessagingPhoneNumber::all();
23
+    }
24
+
25
+    public function testIsRetrievable()
26
+    {
27
+        $this->expectException('Telnyx\Exception\UnexpectedValueException');
28
+
29
+        $this->expectsRequest(
30
+            'get',
31
+            '/v2/messaging_phone_numbers/' . urlencode(self::TEST_RESOURCE_ID)
32
+        );
33
+        $resource = MessagingPhoneNumber::retrieve(self::TEST_RESOURCE_ID);
34
+    }
35
+
36
+    public function testIsUpdatable()
37
+    {
38
+        $this->expectException('Telnyx\Exception\UnexpectedValueException');
39
+
40
+        $this->expectsRequest(
41
+            'patch',
42
+            '/v2/messaging_phone_numbers/' . urlencode(self::TEST_RESOURCE_ID)
43
+        );
44
+        $resource = MessagingPhoneNumber::update(self::TEST_RESOURCE_ID, [
45
+            "name" => "value",
46
+        ]);
47
+    }
48
+}