You are here

public function SmsDevelMessageTest::testReceiveSkipQueue in SMS Framework 2.1.x

Same name and namespace in other branches
  1. 8 modules/sms_devel/tests/src/Functional/SmsDevelMessageTest.php \Drupal\Tests\sms_devel\Functional\SmsDevelMessageTest::testReceiveSkipQueue()
  2. 2.x modules/sms_devel/tests/src/Functional/SmsDevelMessageTest.php \Drupal\Tests\sms_devel\Functional\SmsDevelMessageTest::testReceiveSkipQueue()

Tests receiving functionality skipping queue.

File

modules/sms_devel/tests/src/Functional/SmsDevelMessageTest.php, line 86

Class

SmsDevelMessageTest
Tests the message form.

Namespace

Drupal\Tests\sms_devel\Functional

Code

public function testReceiveSkipQueue() {
  $edit['number'] = $this
    ->randomPhoneNumbers(1)[0];
  $edit['message'] = $this
    ->randomString();
  $edit['gateway'] = $this->gateway
    ->id();
  $edit['skip_queue'] = TRUE;
  $this
    ->drupalPostForm(Url::fromRoute('sms_devel.message'), $edit, t('Receive'));
  $this
    ->assertSession()
    ->responseContains('Message was processed, 1 delivery reports were generated.');
  $this
    ->assertEquals($edit['message'], sms_test_gateway_get_incoming()['message']);
}