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