You are here

public function SmsDevelMessageTest::testReceiveGatewayInvalid 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::testReceiveGatewayInvalid()
  2. 2.x modules/sms_devel/tests/src/Functional/SmsDevelMessageTest.php \Drupal\Tests\sms_devel\Functional\SmsDevelMessageTest::testReceiveGatewayInvalid()

Tests receiving with no selected gateway.

File

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

Class

SmsDevelMessageTest
Tests the message form.

Namespace

Drupal\Tests\sms_devel\Functional

Code

public function testReceiveGatewayInvalid() {
  $edit['gateway'] = '';
  $this
    ->drupalPostForm(Url::fromRoute('sms_devel.message'), $edit, t('Receive'));
  $this
    ->assertSession()
    ->responseContains('Gateway must be selected if receiving a message.');
}