Skip to content

Commit

Permalink
Fixes to return values & tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
pekkis committed Dec 18, 2012
1 parent e5e26e1 commit 1a98d9b
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
2 changes: 2 additions & 0 deletions library/Xi/Sms/Gateway/ClickatellGateway.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,5 +56,7 @@ public function send(SmsMessage $message)
"&password={$this->password}&to={$to}&text={$body}&from={$from}";
$this->getClient()->post($url, array());
}

return true;
}
}
1 change: 1 addition & 0 deletions library/Xi/Sms/Gateway/InfobipGateway.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,5 +87,6 @@ public function send(SmsMessage $message)
$writer->endDocument();

$this->getClient()->post($this->endpoint . '/sendsms/xml', array(), $writer->outputMemory());
return true;
}
}
4 changes: 3 additions & 1 deletion tests/Xi/Sms/Tests/Gateway/ClickatellGatewayTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ public function sendsCorrectlyFormattedXmlToRightPlace()
'358503028030'
);

$gateway->send($message);
$ret = $gateway->send($message);

$this->assertTrue($ret);
}
}
5 changes: 4 additions & 1 deletion tests/Xi/Sms/Tests/Gateway/InfobipGatewayTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ public function sendsCorrectlyFormattedXmlToRightPlace()

$message->addTo('358407682810');

$gateway->send($message);
$ret = $gateway->send($message);

$this->assertTrue($ret);

}
}

0 comments on commit 1a98d9b

Please sign in to comment.