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