public function tearDown()
 {
     $this->CI->db->truncate('group_messages');
     $this->CI->db->truncate('group_annotations');
     $this->CI->db->truncate('user_messages');
     $this->CI->db->truncate('messages');
     parent::tearDown();
 }
 public function tearDown()
 {
     $this->CI->db->truncate('user_messages');
     $this->CI->db->truncate('messages');
     $this->CI->db->delete('users', array('id >' => 1));
     $this->users = array();
     parent::tearDown();
 }
示例#3
0
 public function setUp()
 {
     parent::setUp();
     // set up our request
     $this->setPath('/twiml/applet/voice/1/854578');
     $this->setRequestMethod('POST');
     // prepare the header token for request validation
     $this->setRequestToken();
 }
示例#4
0
 public function setUp()
 {
     parent::setUp();
     $this->setFlow(array('id' => 1, 'user_id' => 1, 'created' => NULL, 'updated' => NULL, 'data' => NULL, 'sms_data' => '{"start":{"name":"Message Received","data":{"next":"start/1f5a31"},"id":"start","type":"standard---start"},"1f5a31":{"name":"Sms","data":{"sms":"' . $this->message . '","next":""},"id":"1f5a31","type":"sms---sms"}}', 'tenant_id' => 1));
     // set up our request
     $this->setPath('/twiml/applet/sms/1/1f5a31');
     $this->setRequestMethod('POST');
     // prepare the header token for request validation
     $this->setRequestToken();
 }
示例#5
0
 public function setUp()
 {
     parent::setUp();
     $this->setFlow(array('id' => 1, 'user_id' => 1, 'created' => NULL, 'updated' => NULL, 'data' => '', 'sms_data' => '', 'tenant_id' => 1));
     // set up the request
     $this->setPath('/twiml/applet/voice/1/4a7eed');
     $this->setRequestMethod('POST');
     // prepare the header token for request validation
     $this->setRequestToken();
 }
示例#6
0
 public function setUp()
 {
     parent::setUp();
     $this->setFlow(array('id' => 1, 'user_id' => 1, 'created' => NULL, 'updated' => NULL, 'data' => '{"start":{"name":"Call Start","data":{"next":"start/f1e974"},"id":"start","type":"standard---start"}}', 'sms_data' => '{"start":{"name":"Message Received","data":{"next":"start/f1e974"},"id":"start","type":"standard---start"}}', 'tenant_id' => 1));
     // set up our request
     $this->setPath('/twiml/applet/voice/1/f1e974');
     $this->setRequestMethod('POST');
     // prepare the header token for request validation
     $this->setRequestToken();
 }
示例#7
0
 public function setUp()
 {
     parent::setUp();
     // set up our request
     $this->setPath('/twiml/applet/sms/1/3c8aaf');
     $this->setRequestMethod('POST');
     // prepare the header token for request validation
     $this->setRequestToken();
     $this->setFlow(array('id' => 1, 'user_id' => 1, 'created' => NULL, 'updated' => NULL, 'data' => '', 'sms_data' => '', 'tenant_id' => 1));
     $this->setRequest(array('SmsSid' => $this->message_sid, 'From' => $this->message_from, 'To' => $this->message_to, 'Body' => $this->message_body));
 }
示例#8
0
 public function setUp()
 {
     parent::setUp();
     $this->setFlow(array('id' => 1, 'user_id' => 1, 'created' => NULL, 'updated' => NULL, 'data' => '{"start":{"name":"Call Start","data":{"next":"start/4a7eed"},"id":"start","type":"standard---start"},"4a7eed":{"name":"Dial","data":{"dial-whom-user-or-group_id":"","dial-whom-user-or-group_type":"","dial-whom-selector":"number","dial-whom-number":"' . $this->dial_number . '","callerId":"","no-answer-action":"voicemail","no-answer-group-voicemail_say":"","no-answer-group-voicemail_play":"","no-answer-group-voicemail_mode":"","no-answer-group-voicemail_tag":"global","no-answer-group-voicemail_caller_id":"+14158774003","number":"","library":"","no-answer-redirect":"","no-answer-redirect-number":"start/4a7eed/e18b35","version":"3"},"id":"4a7eed","type":"standard---dial"},"e18b35":{"name":"Hangup","data":{},"id":"e18b35","type":"standard---hangup"}}', 'sms_data' => '', 'tenant_id' => 1));
     // set up the request
     $this->setPath('/twiml/applet/voice/1/4a7eed');
     $this->setRequestMethod('POST');
     // prepare the header token for request validation
     $this->setRequestToken();
     $this->setRequest(array('CallSid' => 'CA12345', 'AccountSid' => 'AC12345', 'From' => NULL, 'To' => NULL, 'Direction' => 'inbound', 'CallStatus' => 'ringing'));
 }
示例#9
0
 public function setUp()
 {
     parent::setUp();
     // set up the flow data
     $this->setFlow(array('id' => 1, 'user_id' => 1, 'created' => NULL, 'updated' => NULL, 'data' => '{"start":{"name":"Call Start","data":{"next":"start/9c7df4"},"id":"start","type":"standard---start"},"9c7df4":{"name":"Sms","data":{"sms":"' . $this->message . '","next":"start/9c7df4/' . $this->redirect_id . '"},"id":"9c7df4","type":"sms---sms"},"' . $this->redirect_id . '":{"name":"Hangup","data":{},"id":"' . $this->redirect_id . '","type":"standard---hangup"}}', 'sms_data' => '', 'tenant_id' => 1));
     // set up the request
     $this->setPath('/twiml/applet/voice/1/9c7df4');
     $this->setRequestMethod('POST');
     // prepare the header token for request validation
     $this->setRequestToken();
 }
示例#10
0
 public function setUp()
 {
     parent::setUp();
     // set up the flow data
     $this->setFlow(array('id' => 1, 'user_id' => 1, 'created' => NULL, 'updated' => NULL, 'data' => '{"start":{"name":"Call Start","data":{"next":"start/7b0c75"},"id":"start","type":"standard---start"},"7b0c75":{"name":"Conference","data":{"moderator_id":"1","moderator_type":"user","wait-url":"http://twimlets.com/holdmusic?Bucket=com.twilio.music.ambient","conf-id":"conf_4ed7c201a541e"},"id":"7b0c75","type":"standard---conference"}}', 'sms_data' => '', 'tenant_id' => 1));
     // set up the request
     $this->setPath('/twiml/applet/voice/1/7b0c75');
     $this->setRequestMethod('POST');
     // prepare the header token for request validation
     $this->setRequestToken();
 }
 public function tearDown()
 {
     $this->group->remove_user($user1->id);
     $this->group->remove_user($user2->id);
     $this->CI->db->truncate('group_messages');
     $this->CI->db->truncate('group_annotations');
     $this->CI->db->truncate('user_messages');
     $this->CI->db->truncate('messages');
     $this->CI->db->delete('users', array('id >' => 1));
     $this->CI->db->delete('groups', array('id >' => 2));
     $this->users = array();
     $this->group = null;
     parent::tearDown();
 }
 public function setUp()
 {
     parent::setUp();
     // set the user's voicemail to be a recording
     $this->user = VBX_User::get($this->user_id);
     $this->user->voicemail = $this->upload_prefix . $this->filename;
     $this->user->save();
     $this->setFlow(array('id' => 1, 'user_id' => 1, 'created' => NULL, 'updated' => NULL, 'data' => '{"start":{"name":"Call Start","data":{"next":"start/59c7d7"},"id":"start","type":"standard---start"},"59c7d7":{"name":"Voicemail","data":{"prompt_say":"","prompt_play":"","prompt_mode":"","prompt_tag":"global","number":"","library":"","permissions_id":"' . $this->user_id . '","permissions_type":"user"},"id":"59c7d7","type":"standard---voicemail"}}', 'sms_data' => NULL, 'tenant_id' => 1));
     // set up our request
     $this->setPath('/twiml/applet/voice/1/59c7d7');
     $this->setRequestMethod('POST');
     // prepare the header token for request validation
     $this->setRequestToken();
 }
示例#13
0
 public function tearDown()
 {
     parent::tearDown();
 }
示例#14
0
 public function setUp()
 {
     parent::setUp();
     $this->setFlow(array('id' => 1, 'user_id' => 1, 'created' => NULL, 'updated' => NULL, 'data' => '{"start":{"name":"Call Start","data":{"next":"start/777eca"},"id":"start","type":"standard---start"},"e18b35":{"name":"Hangup","data":{},"id":"e18b35","type":"standard---hangup"},"777eca":{"name":"Greeting","data":{"prompt_say":"' . $this->prompt . '","prompt_play":"","prompt_mode":"say","prompt_tag":"global","prompt_caller_id":"+14158774003","number":"","library":"","next":"start/777eca/db4f8d"},"id":"777eca","type":"standard---greeting"},"db4f8d":{"name":"Hangup","data":{},"id":"db4f8d","type":"standard---hangup"}}', 'sms_data' => NULL, 'tenant_id' => 1));
 }
示例#15
0
 public function setUp()
 {
     parent::setUp();
     $this->setFlow(array('id' => 1, 'user_id' => 1, 'created' => NULL, 'updated' => NULL, 'data' => '{"start":{"name":"Call Start","data":{"next":"start/a9afb"},"id":"start","type":"standard---start"},"a9afb":{"name":"Greeting","data":{"prompt_say":"' . $this->prompt . '","prompt_play":"","prompt_mode":"say","prompt_tag":"global","number":"","library":"","next":""},"id":"a9afb","type":"standard---greeting"}}', 'sms_data' => NULL, 'tenant_id' => 1));
 }