public function SmsDevelMessageTest::testReceiveSkipQueue in SMS Framework 8
Same name and namespace in other branches
- 2.x modules/sms_devel/tests/src/Functional/SmsDevelMessageTest.php \Drupal\Tests\sms_devel\Functional\SmsDevelMessageTest::testReceiveSkipQueue()
- 2.1.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 81
Class
- SmsDevelMessageTest
- Tests the message form.
Namespace
Drupal\Tests\sms_devel\FunctionalCode
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()
->statusCodeEquals(200);
$this
->assertSession()
->responseContains('Message was processed, 1 delivery reports were generated.');
$this
->assertEquals($edit['message'], sms_test_gateway_get_incoming()['message']);
}