You are here

public function SmsFrameworkSettingsTest::testGatewaySet in SMS Framework 8

Same name and namespace in other branches
  1. 2.x tests/src/Functional/SmsFrameworkSettingsTest.php \Drupal\Tests\sms\Functional\SmsFrameworkSettingsTest::testGatewaySet()
  2. 2.1.x tests/src/Functional/SmsFrameworkSettingsTest.php \Drupal\Tests\sms\Functional\SmsFrameworkSettingsTest::testGatewaySet()

Test setting gateway.

File

tests/src/Functional/SmsFrameworkSettingsTest.php, line 38

Class

SmsFrameworkSettingsTest
Tests SMS Framework settings form.

Namespace

Drupal\Tests\sms\Functional

Code

public function testGatewaySet() {
  $gateway = $this
    ->createMemoryGateway();
  $edit['fallback_gateway'] = $gateway
    ->id();
  $edit['pages[verify]'] = '/' . $this
    ->randomMachineName();
  $this
    ->drupalPostForm(Url::fromRoute('sms.settings'), $edit, 'Save configuration');
  $this
    ->assertRaw(t('SMS settings saved.'));
}