public function SmsDevelMessageTest::testAutomated 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::testAutomated()
- 2.1.x modules/sms_devel/tests/src/Functional/SmsDevelMessageTest.php \Drupal\Tests\sms_devel\Functional\SmsDevelMessageTest::testAutomated()
Tests tagging message as automated.
File
- modules/
sms_devel/ tests/ src/ Functional/ SmsDevelMessageTest.php, line 129
Class
- SmsDevelMessageTest
- Tests the message form.
Namespace
Drupal\Tests\sms_devel\FunctionalCode
public function testAutomated() {
$edit['number'] = $this
->randomPhoneNumbers(1)[0];
$edit['message'] = $this
->randomString();
$edit['skip_queue'] = FALSE;
$edit['automated'] = FALSE;
$this
->drupalPostForm(Url::fromRoute('sms_devel.message'), $edit, t('Send'));
$messages = SmsMessage::loadMultiple();
$message = reset($messages);
$this
->assertFalse($message
->isAutomated(), 'Message is not automated');
}