You are here

public function SmsFrameworkQueueTest::testQueueNotDelayedScheduleAware in SMS Framework 8

Same name and namespace in other branches
  1. 2.x tests/src/Kernel/SmsFrameworkQueueTest.php \Drupal\Tests\sms\Kernel\SmsFrameworkQueueTest::testQueueNotDelayedScheduleAware()
  2. 2.1.x tests/src/Kernel/SmsFrameworkQueueTest.php \Drupal\Tests\sms\Kernel\SmsFrameworkQueueTest::testQueueNotDelayedScheduleAware()

Test message is not delayed for schedule aware gateways..

File

tests/src/Kernel/SmsFrameworkQueueTest.php, line 131

Class

SmsFrameworkQueueTest
Tests behaviour of SMS Framework message queue.

Namespace

Drupal\Tests\sms\Kernel

Code

public function testQueueNotDelayedScheduleAware() {
  $gateway = $this
    ->createMemoryGateway([
    'plugin' => 'memory_schedule_aware',
  ]);
  $sms_message = $this
    ->createSmsMessage()
    ->setSendTime(REQUEST_TIME + 9999)
    ->setGateway($gateway);
  $this->smsProvider
    ->queue($sms_message);
  $this->cronService
    ->run();
  $this
    ->assertEquals(1, count($this
    ->getTestMessages($gateway)), 'Message sent.');
}