public function SmsFrameworkQueueTest::testQueueOutgoing in SMS Framework 2.1.x
Same name and namespace in other branches
- 8 tests/src/Kernel/SmsFrameworkQueueTest.php \Drupal\Tests\sms\Kernel\SmsFrameworkQueueTest::testQueueOutgoing()
- 2.x tests/src/Kernel/SmsFrameworkQueueTest.php \Drupal\Tests\sms\Kernel\SmsFrameworkQueueTest::testQueueOutgoing()
Test message is queued and sent on cron run.
File
- tests/
src/ Kernel/ SmsFrameworkQueueTest.php, line 107
Class
- SmsFrameworkQueueTest
- Tests behaviour of SMS Framework message queue.
Namespace
Drupal\Tests\sms\KernelCode
public function testQueueOutgoing() {
$sms_message = $this
->createSmsMessage()
->setDirection(Direction::OUTGOING);
$this->smsProvider
->queue($sms_message);
$this
->assertEquals(0, count($this
->getTestMessages($this->gateway)), 'Message not sent yet.');
$this->cronService
->run();
$this
->assertEquals(1, count($this
->getTestMessages($this->gateway)), 'Message was sent.');
}