You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$this->assertEquals(sprintf($tropo), '{"tropo":[{"message":{"say":{"value":"This is the subject","media":"http://user:[email protected]/1.jpg"},"to":"sip:[email protected]:5678","network":"MMS"}}]}');
23
+
}
24
+
25
+
publicfunctiontestMessageWithMMS1() {
26
+
$tropo = newTropo();
27
+
$say = newSay("This is the subject",null, null, null, null, null,null,null,array("http://server.com/1.jpg", "this is a inline text content", "http://filehosting.tropo.com/account/1/2.text"));
$this->assertEquals(sprintf($tropo), '{"tropo":[{"message":{"say":{"value":"This is the subject","media":["http://server.com/1.jpg","this is a inline text content","http://filehosting.tropo.com/account/1/2.text"]},"to":"sip:[email protected]:5678","network":"MMS"}}]}');
Copy file name to clipboardExpand all lines: tests/SayTest.php
+62Lines changed: 62 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -16,6 +16,18 @@ public function testSayWithOptions() {
16
16
$this->assertEquals(sprintf($tropo), '{"tropo":[{"say":[{"value":"Please enter your account number...","name":"say"}]}]}');
17
17
}
18
18
19
+
publicfunctiontestSayWithOptions1() {
20
+
$tropo = newTropo();
21
+
$tropo->say("Please enter your account number...",array('name' => 'say','media' => 'http://user:[email protected]/1.jpg'));
22
+
$this->assertEquals(sprintf($tropo), '{"tropo":[{"say":[{"value":"Please enter your account number...","name":"say","media":"http://user:[email protected]/1.jpg"}]}]}');
23
+
}
24
+
25
+
publicfunctiontestSayWithOptions2() {
26
+
$tropo = newTropo();
27
+
$tropo->say("Please enter your account number...",array('name' => 'say','media' => array('http://server.com/1.jpg', 'this is a inline text content', 'http://filehosting.tropo.com/account/1/2.text')));
28
+
$this->assertEquals(sprintf($tropo), '{"tropo":[{"say":[{"value":"Please enter your account number...","name":"say","media":["http://server.com/1.jpg","this is a inline text content","http://filehosting.tropo.com/account/1/2.text"]}]}]}');
29
+
}
30
+
19
31
publicfunctiontestCreateSayObject()
20
32
{
21
33
$tropo = newTropo();
@@ -40,6 +52,56 @@ public function testCreateSayObject1()
40
52
$this->assertEquals(sprintf($tropo), '{"tropo":[{"say":[{"value":"Please enter your account number...","as":"DATE","voice":"allison","allowSignals":["exit","quit"],"required":true,"promptLogSecurity":"suppress"}]}]}');
41
53
}
42
54
55
+
publicfunctiontestCreateSayObject2()
56
+
{
57
+
$tropo = newTropo();
58
+
$allowSignals = array('exit','quit');
59
+
$say = newSay("Please enter your account number...", SayAs::$date, null, Voice::$US_English_female_allison, $allowSignals, null, true, "suppress", "http://user:[email protected]/1.jpg");
60
+
$tropo->say($say);
61
+
$this->assertEquals(sprintf($tropo), '{"tropo":[{"say":[{"value":"Please enter your account number...","as":"DATE","voice":"allison","allowSignals":["exit","quit"],"required":true,"promptLogSecurity":"suppress","media":"http://user:[email protected]/1.jpg"}]}]}');
62
+
}
63
+
64
+
publicfunctiontestCreateSayObject3()
65
+
{
66
+
$tropo = newTropo();
67
+
$allowSignals = array('exit','quit');
68
+
$say = newSay("Please enter your account number...", SayAs::$date, null, Voice::$US_English_female_allison, $allowSignals, null, true, "suppress", array('http://server.com/1.jpg', 'this is a inline text content', 'http://filehosting.tropo.com/account/1/2.text'));
69
+
$tropo->say($say);
70
+
$this->assertEquals(sprintf($tropo), '{"tropo":[{"say":[{"value":"Please enter your account number...","as":"DATE","voice":"allison","allowSignals":["exit","quit"],"required":true,"promptLogSecurity":"suppress","media":["http://server.com/1.jpg","this is a inline text content","http://filehosting.tropo.com/account/1/2.text"]}]}]}');
$tropo->say("Please enter your account number...",$params);
86
+
$this->assertEquals(sprintf($tropo), '{"tropo":[{"say":[{"value":"Please enter your account number...","as":"DATE","voice":"allison","allowSignals":["exit","quit"],"required":true,"promptLogSecurity":"suppress","media":"http://user:[email protected]/1.jpg"}]}]}');
87
+
}
88
+
89
+
publicfunctiontestCreateSayObject5()
90
+
{
91
+
$tropo = newTropo();
92
+
$allowSignals = array('exit','quit');
93
+
$params = array(
94
+
"as"=>SayAs::$date,
95
+
"event"=>"event",
96
+
"voice"=>Voice::$US_English_female_allison,
97
+
"allowSignals"=>$allowSignals,
98
+
"promptLogSecurity"=>"suppress",
99
+
"required"=>true,
100
+
"media"=>array('http://server.com/1.jpg', 'this is a inline text content', 'http://filehosting.tropo.com/account/1/2.text'));
101
+
$tropo->say("Please enter your account number...",$params);
102
+
$this->assertEquals(sprintf($tropo), '{"tropo":[{"say":[{"value":"Please enter your account number...","as":"DATE","voice":"allison","allowSignals":["exit","quit"],"required":true,"promptLogSecurity":"suppress","media":["http://server.com/1.jpg","this is a inline text content","http://filehosting.tropo.com/account/1/2.text"]}]}]}');
0 commit comments