diff -r 07239de796bb -r e756a8c72c3d cms/drupal/modules/syslog/syslog.test --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/cms/drupal/modules/syslog/syslog.test Fri Sep 08 12:04:06 2017 +0200 @@ -0,0 +1,44 @@ + 'Syslog functionality', + 'description' => 'Test syslog settings.', + 'group' => 'Syslog' + ); + } + + function setUp() { + parent::setUp('syslog'); + } + + /** + * Tests the syslog settings page. + */ + function testSettings() { + $admin_user = $this->drupalCreateUser(array('administer site configuration')); + $this->drupalLogin($admin_user); + + $edit = array(); + // If we're on Windows, there is no configuration form. + if (defined('LOG_LOCAL6')) { + $this->drupalPost('admin/config/development/logging', array('syslog_facility' => LOG_LOCAL6), t('Save configuration')); + $this->assertText(t('The configuration options have been saved.')); + + $this->drupalGet('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.'); + } + } + } +}