Browse code

removed Telnyx Plivo Twilio Flowroute appinfo/info.xml appinfo/signature.json README.md lib/Controller/AuthorApiController.php

DoubleBastionAdmin authored on 20/08/2022 16:26:33
Showing 1 changed files
1 1
deleted file mode 100644
... ...
@@ -1,76 +0,0 @@
1
-<?php
2
-
3
-namespace Resources;
4
-
5
-
6
-use Plivo\Http\PlivoRequest;
7
-use Plivo\Http\PlivoResponse;
8
-use Plivo\Tests\BaseTestCase;
9
-
10
-/**
11
- * Class RecordingTest
12
- * @package Resources
13
- */
14
-class RecordingTest extends BaseTestCase
15
-{
16
-    function testPricingGet()
17
-    {
18
-        $recording = "c2186400-1c8c-11e4-a664-0026b945b52x";
19
-        $request = new PlivoRequest(
20
-            'GET',
21
-            'Account/MAXXXXXXXXXXXXXXXXXX/Recording/'.$recording.'/',
22
-            []);
23
-        $body = file_get_contents(__DIR__ . '/../Mocks/recordingGetResponse.json');
24
-
25
-        $this->mock(new PlivoResponse($request,200, $body));
26
-
27
-        $actual = $this->client->recordings->get($recording);
28
-
29
-        $this->assertRequest($request);
30
-
31
-        self::assertNotNull($actual);
32
-
33
-        self::assertEquals($recording, $actual->id);
34
-    }
35
-
36
-    function testPricingList()
37
-    {
38
-        $request = new PlivoRequest(
39
-            'GET',
40
-            'Account/MAXXXXXXXXXXXXXXXXXX/Recording/',
41
-            []);
42
-        $body = file_get_contents(__DIR__ . '/../Mocks/recordingListResponse.json');
43
-
44
-        $this->mock(new PlivoResponse($request,200, $body));
45
-
46
-        $actual = $this->client->recordings->list;
47
-
48
-        $this->assertRequest($request);
49
-
50
-        self::assertNotNull($actual);
51
-
52
-        foreach($actual->resources as $object) {
53
-            if($object) {
54
-                self::assertEquals("noname", $object->properties['conferenceName']);
55
-            }    
56
-        }
57
-        
58
-    }
59
-    
60
-    function testRecordingDelete()
61
-    {
62
-        $request = new PlivoRequest(
63
-            'DELETE',
64
-            'Account/MAXXXXXXXXXXXXXXXXXX/Recording/cxcxcx/',
65
-            []);
66
-        $body = '{}';
67
-        
68
-        $this->mock(new PlivoResponse($request,200, $body));
69
-        
70
-        $actual = $this->client->recordings->delete("cxcxcx");
71
-        
72
-        $this->assertRequest($request);
73
-        
74
-        self::assertNull($actual);
75
-    }
76
-}
77 0
\ No newline at end of file
Browse code

Created repository.

DoubleBastionAdmin authored on 01/03/2022 23:47:00
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,76 @@
1
+<?php
2
+
3
+namespace Resources;
4
+
5
+
6
+use Plivo\Http\PlivoRequest;
7
+use Plivo\Http\PlivoResponse;
8
+use Plivo\Tests\BaseTestCase;
9
+
10
+/**
11
+ * Class RecordingTest
12
+ * @package Resources
13
+ */
14
+class RecordingTest extends BaseTestCase
15
+{
16
+    function testPricingGet()
17
+    {
18
+        $recording = "c2186400-1c8c-11e4-a664-0026b945b52x";
19
+        $request = new PlivoRequest(
20
+            'GET',
21
+            'Account/MAXXXXXXXXXXXXXXXXXX/Recording/'.$recording.'/',
22
+            []);
23
+        $body = file_get_contents(__DIR__ . '/../Mocks/recordingGetResponse.json');
24
+
25
+        $this->mock(new PlivoResponse($request,200, $body));
26
+
27
+        $actual = $this->client->recordings->get($recording);
28
+
29
+        $this->assertRequest($request);
30
+
31
+        self::assertNotNull($actual);
32
+
33
+        self::assertEquals($recording, $actual->id);
34
+    }
35
+
36
+    function testPricingList()
37
+    {
38
+        $request = new PlivoRequest(
39
+            'GET',
40
+            'Account/MAXXXXXXXXXXXXXXXXXX/Recording/',
41
+            []);
42
+        $body = file_get_contents(__DIR__ . '/../Mocks/recordingListResponse.json');
43
+
44
+        $this->mock(new PlivoResponse($request,200, $body));
45
+
46
+        $actual = $this->client->recordings->list;
47
+
48
+        $this->assertRequest($request);
49
+
50
+        self::assertNotNull($actual);
51
+
52
+        foreach($actual->resources as $object) {
53
+            if($object) {
54
+                self::assertEquals("noname", $object->properties['conferenceName']);
55
+            }    
56
+        }
57
+        
58
+    }
59
+    
60
+    function testRecordingDelete()
61
+    {
62
+        $request = new PlivoRequest(
63
+            'DELETE',
64
+            'Account/MAXXXXXXXXXXXXXXXXXX/Recording/cxcxcx/',
65
+            []);
66
+        $body = '{}';
67
+        
68
+        $this->mock(new PlivoResponse($request,200, $body));
69
+        
70
+        $actual = $this->client->recordings->delete("cxcxcx");
71
+        
72
+        $this->assertRequest($request);
73
+        
74
+        self::assertNull($actual);
75
+    }
76
+}
0 77
\ No newline at end of file