public function SmsFrameworkQueueTest::testQueueDelayed in SMS Framework 2.x
Same name and namespace in other branches
- 8 tests/src/Kernel/SmsFrameworkQueueTest.php \Drupal\Tests\sms\Kernel\SmsFrameworkQueueTest::testQueueDelayed()
- 2.1.x tests/src/Kernel/SmsFrameworkQueueTest.php \Drupal\Tests\sms\Kernel\SmsFrameworkQueueTest::testQueueDelayed()
Test message is delayed.
File
- tests/
src/ Kernel/ SmsFrameworkQueueTest.php, line 120
Class
- SmsFrameworkQueueTest
- Tests behaviour of SMS Framework message queue.
Namespace
Drupal\Tests\sms\KernelCode
public function testQueueDelayed() {
$sms_message = $this
->createSmsMessage()
->setSendTime(\Drupal::time()
->getRequestTime() + 9999);
$this->smsProvider
->queue($sms_message);
$this->cronService
->run();
$this
->assertEquals(0, count($this
->getTestMessages($this->gateway)), 'Message not sent yet.');
}