Skip to content

Commit

Permalink
Add heavy SMS tests
Browse files Browse the repository at this point in the history
  • Loading branch information
aksalj committed Mar 8, 2018
1 parent 8841bdb commit 635413b
Showing 1 changed file with 31 additions and 1 deletion.
32 changes: 31 additions & 1 deletion tests/SMSTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public function testSMSWithEmptyRecipient()
public function testSingleSMSSending()
{
$response = $this->client->send([
'to' => [Fixtures::$phoneNumber],
'to' => Fixtures::$phoneNumber,
'message' => 'Testing SMS...'
]);

Expand All @@ -56,6 +56,36 @@ public function testMultipleSMSSending()
$this->assertObjectHasAttribute('SMSMessageData', $response['data']);
}

public function testHeavySingleSMSSending()
{
$count = 100000;
$phoneNumbers = array();
for($i=0;$i<$count;$i++) {
array_push($phoneNumbers, "+254724".($count + $i));
};
$response = $this->client->send([
'to' => $phoneNumbers,
'message' => "Testing send a message to $count numbers...",
'enqueue' => true
]);

$this->assertObjectHasAttribute('SMSMessageData', $response['data']);
}

public function testLightMultipleSMSSending()
{
$count = 10;
for($i=0;$i<$count;$i++) {
$num = "+254724".($count + $i);
$response = $this->client->send([
'to' => $num,
'message' => "Testing send a message to $count numbers...",
'enqueue' => true
]);
};
$this->assertObjectHasAttribute('SMSMessageData', $response['data']);
}

public function testSMSSendingWithShortcode()
{
$response = $this->client->send([
Expand Down

0 comments on commit 635413b

Please sign in to comment.