travis tests
This commit is contained in:
parent
abdf2dc15a
commit
b3fbc79d5f
@ -299,31 +299,31 @@ ORDER BY o.id_order ASC";
|
||||
if( $attempts == 0 ){
|
||||
switch ( $this->type ) {
|
||||
case Crunchbutton_Admin_Notification::TYPE_FAX :
|
||||
$this->sendFax( $order );
|
||||
$res =$this->sendFax( $order );
|
||||
break;
|
||||
|
||||
case Crunchbutton_Admin_Notification::TYPE_SMS :
|
||||
$this->sendSms( $order, $this->getSmsMessage($order, 1, 'sms'));
|
||||
$res =$this->sendSms( $order, $this->getSmsMessage($order, 1, 'sms'));
|
||||
break;
|
||||
|
||||
case Crunchbutton_Admin_Notification::TYPE_DUMB_SMS :
|
||||
$this->sendDumbSms( $order );
|
||||
$res =$this->sendDumbSms( $order );
|
||||
break;
|
||||
|
||||
case Crunchbutton_Admin_Notification::TYPE_PHONE :
|
||||
$this->phoneCall( $order );
|
||||
$res =$this->phoneCall( $order );
|
||||
break;
|
||||
|
||||
case Crunchbutton_Admin_Notification::TYPE_EMAIL :
|
||||
$this->sendEmail( $order );
|
||||
$res =$this->sendEmail( $order );
|
||||
break;
|
||||
|
||||
case Crunchbutton_Admin_Notification::TYPE_PUSH_IOS :
|
||||
$this->sendPushIos( $order, $this->getSmsMessage($order, 1, 'push'));
|
||||
$res =$this->sendPushIos( $order, $this->getSmsMessage($order, 1, 'push'));
|
||||
break;
|
||||
|
||||
case Crunchbutton_Admin_Notification::TYPE_PUSH_ANDROID :
|
||||
$this->sendPushAndroid( $order, $this->getSmsMessage($order, 1, 'push'));
|
||||
$res =$this->sendPushAndroid( $order, $this->getSmsMessage($order, 1, 'push'));
|
||||
break;
|
||||
}
|
||||
} else if( $attempts >= 1 ){
|
||||
@ -344,16 +344,16 @@ ORDER BY o.id_order ASC";
|
||||
switch ( $this->type ) {
|
||||
|
||||
case Crunchbutton_Admin_Notification::TYPE_PUSH_IOS :
|
||||
return $this->sendPushIos( $order, $this->getSmsMessage($order, $c, 'push'));
|
||||
$res = $this->sendPushIos( $order, $this->getSmsMessage($order, $c, 'push'));
|
||||
break;
|
||||
|
||||
case Crunchbutton_Admin_Notification::TYPE_PUSH_ANDROID :
|
||||
return $this->sendPushAndroid( $order, $this->getSmsMessage($order, $c, 'push'));
|
||||
$res = $this->sendPushAndroid( $order, $this->getSmsMessage($order, $c, 'push'));
|
||||
break;
|
||||
|
||||
default:
|
||||
case Crunchbutton_Admin_Notification::TYPE_SMS :
|
||||
return $this->sendSms( $order, $this->getSmsMessage($order, $c, 'sms'));
|
||||
$res = $this->sendSms( $order, $this->getSmsMessage($order, $c, 'sms'));
|
||||
break;
|
||||
}
|
||||
|
||||
@ -376,6 +376,8 @@ ORDER BY o.id_order ASC";
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return $res;
|
||||
}
|
||||
|
||||
public function admin(){
|
||||
|
||||
@ -73,7 +73,10 @@ class NotificationTest extends PHPUnit_Framework_TestCase {
|
||||
'active' => 1
|
||||
]))->save();
|
||||
|
||||
$sids = $n->send($this->order);
|
||||
$res = $n->send($this->order);
|
||||
echo 'RES';
|
||||
print_r($res);
|
||||
|
||||
$status = true;
|
||||
foreach ($sids as $res) {
|
||||
if (!$res->sid) {
|
||||
|
||||
@ -31,6 +31,17 @@ describe('Page', function() {
|
||||
checkReadyState();
|
||||
});
|
||||
});
|
||||
|
||||
it('should wait 5 seconds for content', function() {
|
||||
|
||||
waitsFor(function() {
|
||||
return content;
|
||||
});
|
||||
|
||||
runs(function() {
|
||||
expect(content ? true : false).toBeTruthy();
|
||||
});
|
||||
});
|
||||
|
||||
it('should finish rendering', function() {
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user