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,86 @@
1
+<?php
2
+namespace XML;
3
+
4
+use Plivo\XML\Response;
5
+use Plivo\Tests\BaseTestCase;
6
+
7
+/**
8
+ * Class LangTest
9
+ * @package Plivo\Tests\XML
10
+ */
11
+class LangTest extends BaseTestCase 
12
+{
13
+    
14
+    function testAddLang()
15
+    {
16
+        $response = new Response();
17
+        $params1 = array(
18
+            'language' => 'en-IN',
19
+            'voice' => 'Polly.Aditi'  
20
+        );
21
+
22
+        $response->addSpeak('Hello,',$params1)
23
+            ->continueSpeak('Welcome to Plivo')
24
+            ->addLang('hallo, plivo mein aapaka svaagat hai',array('xmllang'=>'hi-IN'));
25
+        $ssml = $response->toXML(true);
26
+        self::assertNotNull($ssml);
27
+
28
+        self::assertXmlStringEqualsXmlFile(__DIR__ . '/../Mocks/langSpeak.xml',$ssml);
29
+    }
30
+
31
+    function testExceptionAddLang()
32
+    {
33
+        $this->expectPlivoException('Plivo\Exceptions\PlivoXMLException');
34
+        $params1 = array(
35
+            'language' => 'en-IN',
36
+            'voice' => 'Polly.Aditi'  
37
+        );
38
+        $response = new Response();
39
+        $response->addSpeak('Hello,',$params1)
40
+            ->continueSpeak('Welcome to Plivo')
41
+            ->addLang('',array('xmllang'=>'hi-IN'));
42
+    }
43
+
44
+    function testExceptionAttributeXmlLangAddLang()
45
+    {
46
+        $this->expectPlivoException('Plivo\Exceptions\PlivoXMLException');
47
+        $params1 = array(
48
+            'language' => 'en-IN',
49
+            'voice' => 'Polly.Aditi'  
50
+        );
51
+        $response = new Response();
52
+        $response->addSpeak('Hello,',$params1)
53
+            ->continueSpeak('Welcome to Plivo')
54
+            ->addLang('hallo, plivo mein aapaka svaagat hai',array('xmlLang'=>'hi-IN'));
55
+    }
56
+
57
+    function testExceptionAttributeXmlLangValueAddLang()
58
+    {
59
+        $this->expectPlivoException('Plivo\Exceptions\PlivoXMLException');
60
+        $params1 = array(
61
+            'language' => 'en-IN',
62
+            'voice' => 'Polly.Aditi'  
63
+        );
64
+        $response = new Response();
65
+        $response->addSpeak('Hello,',$params1)
66
+            ->continueSpeak('Welcome to Plivo')
67
+            ->addLang('hallo, plivo mein aapaka svaagat hai',array('xmllang'=>'hi-MAL'));
68
+    }
69
+
70
+    function testExceptionSSMLSupported()
71
+    {
72
+        $this->expectPlivoException('Plivo\Exceptions\PlivoXMLException');
73
+        $params1 = array(
74
+            'language' => 'en-US' 
75
+        );
76
+        $params2 = array(
77
+            'strength' => 'x-weak',
78
+            'times' => '3s'  
79
+        );
80
+        $response = new Response();
81
+        $response->addSpeak('Hello,',$params1)
82
+            ->continueSpeak('Welcome to Plivo')
83
+            ->addLang('hallo, plivo mein aapaka svaagat hai',array('xmlLang'=>'hi-IN'));
84
+    }
85
+
86
+}
0 87
\ No newline at end of file
Browse code

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

DoubleBastionAdmin authored on 05/11/2025 13:12:22
Showing 1 changed files
1 1
deleted file mode 100644
... ...
@@ -1,86 +0,0 @@
1
-<?php
2
-namespace XML;
3
-
4
-use Plivo\XML\Response;
5
-use Plivo\Tests\BaseTestCase;
6
-
7
-/**
8
- * Class LangTest
9
- * @package Plivo\Tests\XML
10
- */
11
-class LangTest extends BaseTestCase 
12
-{
13
-    
14
-    function testAddLang()
15
-    {
16
-        $response = new Response();
17
-        $params1 = array(
18
-            'language' => 'en-IN',
19
-            'voice' => 'Polly.Aditi'  
20
-        );
21
-
22
-        $response->addSpeak('Hello,',$params1)
23
-            ->continueSpeak('Welcome to Plivo')
24
-            ->addLang('hallo, plivo mein aapaka svaagat hai',array('xmllang'=>'hi-IN'));
25
-        $ssml = $response->toXML(true);
26
-        self::assertNotNull($ssml);
27
-
28
-        self::assertXmlStringEqualsXmlFile(__DIR__ . '/../Mocks/langSpeak.xml',$ssml);
29
-    }
30
-
31
-    function testExceptionAddLang()
32
-    {
33
-        $this->expectPlivoException('Plivo\Exceptions\PlivoXMLException');
34
-        $params1 = array(
35
-            'language' => 'en-IN',
36
-            'voice' => 'Polly.Aditi'  
37
-        );
38
-        $response = new Response();
39
-        $response->addSpeak('Hello,',$params1)
40
-            ->continueSpeak('Welcome to Plivo')
41
-            ->addLang('',array('xmllang'=>'hi-IN'));
42
-    }
43
-
44
-    function testExceptionAttributeXmlLangAddLang()
45
-    {
46
-        $this->expectPlivoException('Plivo\Exceptions\PlivoXMLException');
47
-        $params1 = array(
48
-            'language' => 'en-IN',
49
-            'voice' => 'Polly.Aditi'  
50
-        );
51
-        $response = new Response();
52
-        $response->addSpeak('Hello,',$params1)
53
-            ->continueSpeak('Welcome to Plivo')
54
-            ->addLang('hallo, plivo mein aapaka svaagat hai',array('xmlLang'=>'hi-IN'));
55
-    }
56
-
57
-    function testExceptionAttributeXmlLangValueAddLang()
58
-    {
59
-        $this->expectPlivoException('Plivo\Exceptions\PlivoXMLException');
60
-        $params1 = array(
61
-            'language' => 'en-IN',
62
-            'voice' => 'Polly.Aditi'  
63
-        );
64
-        $response = new Response();
65
-        $response->addSpeak('Hello,',$params1)
66
-            ->continueSpeak('Welcome to Plivo')
67
-            ->addLang('hallo, plivo mein aapaka svaagat hai',array('xmllang'=>'hi-MAL'));
68
-    }
69
-
70
-    function testExceptionSSMLSupported()
71
-    {
72
-        $this->expectPlivoException('Plivo\Exceptions\PlivoXMLException');
73
-        $params1 = array(
74
-            'language' => 'en-US' 
75
-        );
76
-        $params2 = array(
77
-            'strength' => 'x-weak',
78
-            'times' => '3s'  
79
-        );
80
-        $response = new Response();
81
-        $response->addSpeak('Hello,',$params1)
82
-            ->continueSpeak('Welcome to Plivo')
83
-            ->addLang('hallo, plivo mein aapaka svaagat hai',array('xmlLang'=>'hi-IN'));
84
-    }
85
-
86
-}
87 0
\ No newline at end of file
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,86 @@
1
+<?php
2
+namespace XML;
3
+
4
+use Plivo\XML\Response;
5
+use Plivo\Tests\BaseTestCase;
6
+
7
+/**
8
+ * Class LangTest
9
+ * @package Plivo\Tests\XML
10
+ */
11
+class LangTest extends BaseTestCase 
12
+{
13
+    
14
+    function testAddLang()
15
+    {
16
+        $response = new Response();
17
+        $params1 = array(
18
+            'language' => 'en-IN',
19
+            'voice' => 'Polly.Aditi'  
20
+        );
21
+
22
+        $response->addSpeak('Hello,',$params1)
23
+            ->continueSpeak('Welcome to Plivo')
24
+            ->addLang('hallo, plivo mein aapaka svaagat hai',array('xmllang'=>'hi-IN'));
25
+        $ssml = $response->toXML(true);
26
+        self::assertNotNull($ssml);
27
+
28
+        self::assertXmlStringEqualsXmlFile(__DIR__ . '/../Mocks/langSpeak.xml',$ssml);
29
+    }
30
+
31
+    function testExceptionAddLang()
32
+    {
33
+        $this->expectPlivoException('Plivo\Exceptions\PlivoXMLException');
34
+        $params1 = array(
35
+            'language' => 'en-IN',
36
+            'voice' => 'Polly.Aditi'  
37
+        );
38
+        $response = new Response();
39
+        $response->addSpeak('Hello,',$params1)
40
+            ->continueSpeak('Welcome to Plivo')
41
+            ->addLang('',array('xmllang'=>'hi-IN'));
42
+    }
43
+
44
+    function testExceptionAttributeXmlLangAddLang()
45
+    {
46
+        $this->expectPlivoException('Plivo\Exceptions\PlivoXMLException');
47
+        $params1 = array(
48
+            'language' => 'en-IN',
49
+            'voice' => 'Polly.Aditi'  
50
+        );
51
+        $response = new Response();
52
+        $response->addSpeak('Hello,',$params1)
53
+            ->continueSpeak('Welcome to Plivo')
54
+            ->addLang('hallo, plivo mein aapaka svaagat hai',array('xmlLang'=>'hi-IN'));
55
+    }
56
+
57
+    function testExceptionAttributeXmlLangValueAddLang()
58
+    {
59
+        $this->expectPlivoException('Plivo\Exceptions\PlivoXMLException');
60
+        $params1 = array(
61
+            'language' => 'en-IN',
62
+            'voice' => 'Polly.Aditi'  
63
+        );
64
+        $response = new Response();
65
+        $response->addSpeak('Hello,',$params1)
66
+            ->continueSpeak('Welcome to Plivo')
67
+            ->addLang('hallo, plivo mein aapaka svaagat hai',array('xmllang'=>'hi-MAL'));
68
+    }
69
+
70
+    function testExceptionSSMLSupported()
71
+    {
72
+        $this->expectPlivoException('Plivo\Exceptions\PlivoXMLException');
73
+        $params1 = array(
74
+            'language' => 'en-US' 
75
+        );
76
+        $params2 = array(
77
+            'strength' => 'x-weak',
78
+            'times' => '3s'  
79
+        );
80
+        $response = new Response();
81
+        $response->addSpeak('Hello,',$params1)
82
+            ->continueSpeak('Welcome to Plivo')
83
+            ->addLang('hallo, plivo mein aapaka svaagat hai',array('xmlLang'=>'hi-IN'));
84
+    }
85
+
86
+}
0 87
\ No newline at end of file