public function SmsFrameworkWebTest::testDefaultGateway in SMS Framework 7
Tests setting up the default gateway.
File
- tests/
sms.module.test, line 37 - Contains tests for the functions in sms.module and core sms framework.
Class
- SmsFrameworkWebTest
- Provides integration tests for the SMS Framework.
Code
public function testDefaultGateway() {
// Set up default log gateway.
$this
->drupalPost('admin/smsframework/gateways', array(
'default' => 'log',
), t('Set default gateway'));
$this
->assertResponse(200);
$gw = sms_default_gateway();
$this
->assertEqual($gw['identifier'], 'log', 'Default gateway set to log.');
// Set up default test gateway.
$this
->drupalPost('admin/smsframework/gateways', array(
'default' => 'test',
), t('Set default gateway'));
$this
->assertResponse(200);
$gw = sms_default_gateway();
$this
->assertEqual($gw['identifier'], 'test', 'Default gateway set to test.');
}