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,168 @@
1
+<?php
2
+namespace XML;
3
+
4
+use Plivo\XML\Response;
5
+use Plivo\Tests\BaseTestCase;
6
+
7
+/**
8
+ * Class WTest
9
+ * @package Plivo\Tests\XML
10
+ */
11
+class WTest extends BaseTestCase 
12
+{
13
+    
14
+    function testAddW()
15
+    {
16
+        $response = new Response();
17
+        $params1 = array(
18
+            'language' => 'en-US',
19
+            'voice' => 'Polly.Joanna'  
20
+        );
21
+
22
+        $params2 = array(
23
+            'interpret-as' => 'characters'
24
+        );
25
+
26
+        $params3 = array(
27
+            'role' => 'amazon:VB'
28
+        );
29
+
30
+        $params4 = array(
31
+            'role' => 'amazon:VBD'
32
+        );
33
+
34
+        $response->addSpeak('The word ',$params1)
35
+            ->addSayAs('read',$params2)
36
+            ->continueSpeak('may be interpreted as either the present simple form')
37
+            ->addW('read',$params3)
38
+            ->continueSpeak(', or the past participle form')
39
+            ->addW('read',$params4);
40
+        $ssml = $response->toXML(true);
41
+        // $actual = new \DOMDocument;
42
+        // $actual->loadXML($ssml);
43
+
44
+        self::assertNotNull($ssml);
45
+
46
+        self::assertXmlStringEqualsXmlFile(__DIR__ . '/../Mocks/wSpeak.xml',$ssml);
47
+    }
48
+
49
+    function testExceptionAddW()
50
+    {
51
+        $this->expectPlivoException('Plivo\Exceptions\PlivoXMLException');
52
+        $response = new Response();
53
+        $params1 = array(
54
+            'language' => 'en-US',
55
+            'voice' => 'Polly.Joanna'  
56
+        );
57
+
58
+        $params2 = array(
59
+            'interpret-as' => 'character'
60
+        );
61
+
62
+        $params3 = array(
63
+            'roles' => 'amazon:VB'
64
+        );
65
+
66
+        $params4 = array(
67
+            'role' => 'amazon:VBD'
68
+        );
69
+
70
+
71
+        $response->addSpeak('The word ',$params1)
72
+            ->addSayAs('read',$params2)
73
+            ->continueSpeak('may be interpreted as either the present simple form')
74
+            ->addW('',$params3)
75
+            ->continueSpeak(', or the past participle form')
76
+            ->addW('',$params4);
77
+        $ssml = $response->toXML(true);
78
+    }
79
+
80
+    function testExceptionAttributeRoleAddW()
81
+    {
82
+        $this->expectPlivoException('Plivo\Exceptions\PlivoXMLException');
83
+        $response = new Response();
84
+        $params1 = array(
85
+            'language' => 'en-US',
86
+            'voice' => 'Polly.Joanna'  
87
+        );
88
+
89
+        $params2 = array(
90
+            'interpret-as' => 'character'
91
+        );
92
+
93
+        $params3 = array(
94
+            'roles' => 'amazon:VB'
95
+        );
96
+
97
+        $params4 = array(
98
+            'role' => 'amazon:VBD'
99
+        );
100
+
101
+
102
+        $response->addSpeak('The word ',$params1)
103
+            ->addSayAs('read',$params2)
104
+            ->continueSpeak('may be interpreted as either the present simple form')
105
+            ->addW('read',$params3)
106
+            ->continueSpeak(', or the past participle form')
107
+            ->addW('read',$params4);
108
+        $ssml = $response->toXML(true);
109
+    }
110
+
111
+    function testExceptionAttributeRoleValueAddW()
112
+    {
113
+        $this->expectPlivoException('Plivo\Exceptions\PlivoXMLException');
114
+        $response = new Response();
115
+        $params1 = array(
116
+            'language' => 'en-US',
117
+            'voice' => 'Polly.Joanna'  
118
+        );
119
+
120
+        $params2 = array(
121
+            'interpret-as' => 'character'
122
+        );
123
+
124
+        $params3 = array(
125
+            'role' => 'amazon:V'
126
+        );
127
+
128
+        $params4 = array(
129
+            'role' => 'amazon:VBD'
130
+        );
131
+
132
+
133
+        $response->addSpeak('The word ',$params1)
134
+            ->addSayAs('read',$params2)
135
+            ->continueSpeak('may be interpreted as either the present simple form')
136
+            ->addW('read',$params3)
137
+            ->continueSpeak(', or the past participle form')
138
+            ->addW('read',$params4);
139
+        $ssml = $response->toXML(true);
140
+    }
141
+
142
+    function testExceptionSSMLSupported()
143
+    {
144
+        $this->expectPlivoException('Plivo\Exceptions\PlivoXMLException');
145
+        $response = new Response();
146
+        $params1 = array(
147
+            'language' => 'en-US' 
148
+        );
149
+
150
+        $params2 = array(
151
+            'interpret-as' => 'character'
152
+        );
153
+
154
+        $params3 = array(
155
+            'role' => 'amazon:VB'
156
+        );
157
+
158
+        $params4 = array(
159
+            'role' => 'amazon:VBD'
160
+        );
161
+        $response->addSpeak('The word ',$params1)
162
+            ->addSayAs('read',$params2)
163
+            ->continueSpeak('may be interpreted as either the present simple form')
164
+            ->addW('read',$params3)
165
+            ->continueSpeak(', or the past participle form')
166
+            ->addW('read',$params4);
167
+    }
168
+}
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,168 +0,0 @@
1
-<?php
2
-namespace XML;
3
-
4
-use Plivo\XML\Response;
5
-use Plivo\Tests\BaseTestCase;
6
-
7
-/**
8
- * Class WTest
9
- * @package Plivo\Tests\XML
10
- */
11
-class WTest extends BaseTestCase 
12
-{
13
-    
14
-    function testAddW()
15
-    {
16
-        $response = new Response();
17
-        $params1 = array(
18
-            'language' => 'en-US',
19
-            'voice' => 'Polly.Joanna'  
20
-        );
21
-
22
-        $params2 = array(
23
-            'interpret-as' => 'characters'
24
-        );
25
-
26
-        $params3 = array(
27
-            'role' => 'amazon:VB'
28
-        );
29
-
30
-        $params4 = array(
31
-            'role' => 'amazon:VBD'
32
-        );
33
-
34
-        $response->addSpeak('The word ',$params1)
35
-            ->addSayAs('read',$params2)
36
-            ->continueSpeak('may be interpreted as either the present simple form')
37
-            ->addW('read',$params3)
38
-            ->continueSpeak(', or the past participle form')
39
-            ->addW('read',$params4);
40
-        $ssml = $response->toXML(true);
41
-        // $actual = new \DOMDocument;
42
-        // $actual->loadXML($ssml);
43
-
44
-        self::assertNotNull($ssml);
45
-
46
-        self::assertXmlStringEqualsXmlFile(__DIR__ . '/../Mocks/wSpeak.xml',$ssml);
47
-    }
48
-
49
-    function testExceptionAddW()
50
-    {
51
-        $this->expectPlivoException('Plivo\Exceptions\PlivoXMLException');
52
-        $response = new Response();
53
-        $params1 = array(
54
-            'language' => 'en-US',
55
-            'voice' => 'Polly.Joanna'  
56
-        );
57
-
58
-        $params2 = array(
59
-            'interpret-as' => 'character'
60
-        );
61
-
62
-        $params3 = array(
63
-            'roles' => 'amazon:VB'
64
-        );
65
-
66
-        $params4 = array(
67
-            'role' => 'amazon:VBD'
68
-        );
69
-
70
-
71
-        $response->addSpeak('The word ',$params1)
72
-            ->addSayAs('read',$params2)
73
-            ->continueSpeak('may be interpreted as either the present simple form')
74
-            ->addW('',$params3)
75
-            ->continueSpeak(', or the past participle form')
76
-            ->addW('',$params4);
77
-        $ssml = $response->toXML(true);
78
-    }
79
-
80
-    function testExceptionAttributeRoleAddW()
81
-    {
82
-        $this->expectPlivoException('Plivo\Exceptions\PlivoXMLException');
83
-        $response = new Response();
84
-        $params1 = array(
85
-            'language' => 'en-US',
86
-            'voice' => 'Polly.Joanna'  
87
-        );
88
-
89
-        $params2 = array(
90
-            'interpret-as' => 'character'
91
-        );
92
-
93
-        $params3 = array(
94
-            'roles' => 'amazon:VB'
95
-        );
96
-
97
-        $params4 = array(
98
-            'role' => 'amazon:VBD'
99
-        );
100
-
101
-
102
-        $response->addSpeak('The word ',$params1)
103
-            ->addSayAs('read',$params2)
104
-            ->continueSpeak('may be interpreted as either the present simple form')
105
-            ->addW('read',$params3)
106
-            ->continueSpeak(', or the past participle form')
107
-            ->addW('read',$params4);
108
-        $ssml = $response->toXML(true);
109
-    }
110
-
111
-    function testExceptionAttributeRoleValueAddW()
112
-    {
113
-        $this->expectPlivoException('Plivo\Exceptions\PlivoXMLException');
114
-        $response = new Response();
115
-        $params1 = array(
116
-            'language' => 'en-US',
117
-            'voice' => 'Polly.Joanna'  
118
-        );
119
-
120
-        $params2 = array(
121
-            'interpret-as' => 'character'
122
-        );
123
-
124
-        $params3 = array(
125
-            'role' => 'amazon:V'
126
-        );
127
-
128
-        $params4 = array(
129
-            'role' => 'amazon:VBD'
130
-        );
131
-
132
-
133
-        $response->addSpeak('The word ',$params1)
134
-            ->addSayAs('read',$params2)
135
-            ->continueSpeak('may be interpreted as either the present simple form')
136
-            ->addW('read',$params3)
137
-            ->continueSpeak(', or the past participle form')
138
-            ->addW('read',$params4);
139
-        $ssml = $response->toXML(true);
140
-    }
141
-
142
-    function testExceptionSSMLSupported()
143
-    {
144
-        $this->expectPlivoException('Plivo\Exceptions\PlivoXMLException');
145
-        $response = new Response();
146
-        $params1 = array(
147
-            'language' => 'en-US' 
148
-        );
149
-
150
-        $params2 = array(
151
-            'interpret-as' => 'character'
152
-        );
153
-
154
-        $params3 = array(
155
-            'role' => 'amazon:VB'
156
-        );
157
-
158
-        $params4 = array(
159
-            'role' => 'amazon:VBD'
160
-        );
161
-        $response->addSpeak('The word ',$params1)
162
-            ->addSayAs('read',$params2)
163
-            ->continueSpeak('may be interpreted as either the present simple form')
164
-            ->addW('read',$params3)
165
-            ->continueSpeak(', or the past participle form')
166
-            ->addW('read',$params4);
167
-    }
168
-}
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,168 @@
1
+<?php
2
+namespace XML;
3
+
4
+use Plivo\XML\Response;
5
+use Plivo\Tests\BaseTestCase;
6
+
7
+/**
8
+ * Class WTest
9
+ * @package Plivo\Tests\XML
10
+ */
11
+class WTest extends BaseTestCase 
12
+{
13
+    
14
+    function testAddW()
15
+    {
16
+        $response = new Response();
17
+        $params1 = array(
18
+            'language' => 'en-US',
19
+            'voice' => 'Polly.Joanna'  
20
+        );
21
+
22
+        $params2 = array(
23
+            'interpret-as' => 'characters'
24
+        );
25
+
26
+        $params3 = array(
27
+            'role' => 'amazon:VB'
28
+        );
29
+
30
+        $params4 = array(
31
+            'role' => 'amazon:VBD'
32
+        );
33
+
34
+        $response->addSpeak('The word ',$params1)
35
+            ->addSayAs('read',$params2)
36
+            ->continueSpeak('may be interpreted as either the present simple form')
37
+            ->addW('read',$params3)
38
+            ->continueSpeak(', or the past participle form')
39
+            ->addW('read',$params4);
40
+        $ssml = $response->toXML(true);
41
+        // $actual = new \DOMDocument;
42
+        // $actual->loadXML($ssml);
43
+
44
+        self::assertNotNull($ssml);
45
+
46
+        self::assertXmlStringEqualsXmlFile(__DIR__ . '/../Mocks/wSpeak.xml',$ssml);
47
+    }
48
+
49
+    function testExceptionAddW()
50
+    {
51
+        $this->expectPlivoException('Plivo\Exceptions\PlivoXMLException');
52
+        $response = new Response();
53
+        $params1 = array(
54
+            'language' => 'en-US',
55
+            'voice' => 'Polly.Joanna'  
56
+        );
57
+
58
+        $params2 = array(
59
+            'interpret-as' => 'character'
60
+        );
61
+
62
+        $params3 = array(
63
+            'roles' => 'amazon:VB'
64
+        );
65
+
66
+        $params4 = array(
67
+            'role' => 'amazon:VBD'
68
+        );
69
+
70
+
71
+        $response->addSpeak('The word ',$params1)
72
+            ->addSayAs('read',$params2)
73
+            ->continueSpeak('may be interpreted as either the present simple form')
74
+            ->addW('',$params3)
75
+            ->continueSpeak(', or the past participle form')
76
+            ->addW('',$params4);
77
+        $ssml = $response->toXML(true);
78
+    }
79
+
80
+    function testExceptionAttributeRoleAddW()
81
+    {
82
+        $this->expectPlivoException('Plivo\Exceptions\PlivoXMLException');
83
+        $response = new Response();
84
+        $params1 = array(
85
+            'language' => 'en-US',
86
+            'voice' => 'Polly.Joanna'  
87
+        );
88
+
89
+        $params2 = array(
90
+            'interpret-as' => 'character'
91
+        );
92
+
93
+        $params3 = array(
94
+            'roles' => 'amazon:VB'
95
+        );
96
+
97
+        $params4 = array(
98
+            'role' => 'amazon:VBD'
99
+        );
100
+
101
+
102
+        $response->addSpeak('The word ',$params1)
103
+            ->addSayAs('read',$params2)
104
+            ->continueSpeak('may be interpreted as either the present simple form')
105
+            ->addW('read',$params3)
106
+            ->continueSpeak(', or the past participle form')
107
+            ->addW('read',$params4);
108
+        $ssml = $response->toXML(true);
109
+    }
110
+
111
+    function testExceptionAttributeRoleValueAddW()
112
+    {
113
+        $this->expectPlivoException('Plivo\Exceptions\PlivoXMLException');
114
+        $response = new Response();
115
+        $params1 = array(
116
+            'language' => 'en-US',
117
+            'voice' => 'Polly.Joanna'  
118
+        );
119
+
120
+        $params2 = array(
121
+            'interpret-as' => 'character'
122
+        );
123
+
124
+        $params3 = array(
125
+            'role' => 'amazon:V'
126
+        );
127
+
128
+        $params4 = array(
129
+            'role' => 'amazon:VBD'
130
+        );
131
+
132
+
133
+        $response->addSpeak('The word ',$params1)
134
+            ->addSayAs('read',$params2)
135
+            ->continueSpeak('may be interpreted as either the present simple form')
136
+            ->addW('read',$params3)
137
+            ->continueSpeak(', or the past participle form')
138
+            ->addW('read',$params4);
139
+        $ssml = $response->toXML(true);
140
+    }
141
+
142
+    function testExceptionSSMLSupported()
143
+    {
144
+        $this->expectPlivoException('Plivo\Exceptions\PlivoXMLException');
145
+        $response = new Response();
146
+        $params1 = array(
147
+            'language' => 'en-US' 
148
+        );
149
+
150
+        $params2 = array(
151
+            'interpret-as' => 'character'
152
+        );
153
+
154
+        $params3 = array(
155
+            'role' => 'amazon:VB'
156
+        );
157
+
158
+        $params4 = array(
159
+            'role' => 'amazon:VBD'
160
+        );
161
+        $response->addSpeak('The word ',$params1)
162
+            ->addSayAs('read',$params2)
163
+            ->continueSpeak('may be interpreted as either the present simple form')
164
+            ->addW('read',$params3)
165
+            ->continueSpeak(', or the past participle form')
166
+            ->addW('read',$params4);
167
+    }
168
+}