Browse code

added appinfo/info.xml appinfo/signature.json CHANGELOG.txt lib/AppInfo/Application.php css/style.css providers/Plivo

DoubleBastionAdmin authored on 05/11/2025 13:35:09
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,30 @@
1
+<?php
2
+namespace XML;
3
+
4
+use Plivo\XML\Response;
5
+use Plivo\Tests\BaseTestCase;
6
+
7
+/**
8
+ * Class StreamTest
9
+ * @package Plivo\Tests\XML
10
+ */
11
+class StreamTest extends BaseTestCase
12
+{
13
+
14
+    function testAddStream()
15
+    {
16
+        $response = new Response();
17
+        $params1 = array(
18
+            'bidirectional' => true,
19
+            'extraHeaders' => "a=1,b=2"
20
+        );
21
+
22
+        $response->addStream("wss://mystream.ngrok.io/audiostream",$params1);
23
+        $ssml = $response->toXML(true);
24
+
25
+        self::assertNotNull($ssml);
26
+
27
+        self::assertXmlStringEqualsXmlFile(__DIR__ . '/../Mocks/stream.xml',$ssml);
28
+    }
29
+
30
+}