public function SmsDevelMessageTest::testSendSkipQueue in SMS Framework 2.x
Same name and namespace in other branches
- 8 modules/sms_devel/tests/src/Functional/SmsDevelMessageTest.php \Drupal\Tests\sms_devel\Functional\SmsDevelMessageTest::testSendSkipQueue()
- 2.1.x modules/sms_devel/tests/src/Functional/SmsDevelMessageTest.php \Drupal\Tests\sms_devel\Functional\SmsDevelMessageTest::testSendSkipQueue()
Tests sending functionality skipping queue.
File
- modules/
sms_devel/ tests/ src/ Functional/ SmsDevelMessageTest.php, line 53
Class
- SmsDevelMessageTest
- Tests the message form.
Namespace
Drupal\Tests\sms_devel\FunctionalCode
public function testSendSkipQueue() {
$edit['number'] = $this
->randomPhoneNumbers(1)[0];
$edit['message'] = $this
->randomString();
$edit['skip_queue'] = TRUE;
$this
->drupalPostForm(Url::fromRoute('sms_devel.message'), $edit, t('Send'));
$this
->assertSession()
->responseContains('Message was processed, 1 delivery reports were generated.');
$messages = $this
->getTestMessages($this->gateway);
$this
->assertEquals(1, count($messages));
$this
->assertEquals($edit['message'], $messages[0]
->getMessage());
}