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,25 @@
1
+<?php
2
+
3
+namespace Telnyx;
4
+
5
+class TestAvailablePhoneNumber extends TestCase
6
+{
7
+    const TEST_RESOURCE_ID = '+18005554000';
8
+
9
+    public function testIsListable()
10
+    {
11
+        $this->expectsRequest(
12
+            'get',
13
+            '/v2/available_phone_numbers'
14
+        );
15
+        $resources = AvailablePhoneNumber::all([
16
+            'filter' => [
17
+                "limit" => 1,
18
+                "features" => ["sms", "mms"],
19
+                "phone_number" => ["contains" => "555"],
20
+            ]
21
+        ]);
22
+        $this->assertInstanceOf(\Telnyx\Collection::class, $resources);
23
+        $this->assertInstanceOf(\Telnyx\AvailablePhoneNumber::class, $resources[0]);
24
+    }
25
+}