1 syslog.test | SyslogTestCase::testSettings() |
Test the syslog settings page.
File
- core/
modules/ syslog/ tests/ syslog.test, line 15 - Tests for syslog.module.
Class
Code
function testSettings() {
$admin_user = $this->backdropCreateUser(array('administer site configuration'));
$this->backdropLogin($admin_user);
$edit = array();
// If we're on Windows, there is no configuration form.
if (defined('LOG_LOCAL6')) {
$this->backdropPost('admin/config/development/logging', array('syslog_facility' => LOG_LOCAL6), t('Save configuration'));
$this->assertText(t('The configuration options have been saved.'));
$this->backdropGet('admin/config/development/logging');
if ($this->parse()) {
$field = $this->xpath('//option[@value=:value]', array(':value' => LOG_LOCAL6)); // Should be one field.
$this->assertTrue($field[0]['selected'] == 'selected', 'Facility value saved.');
}
}
}