3 namespace Drupal\Tests\syslog\Functional;
5 use Drupal\Tests\BrowserTestBase;
8 * Tests syslog settings.
12 class SyslogTest extends BrowserTestBase {
19 public static $modules = ['syslog'];
22 * Tests the syslog settings page.
24 public function testSettings() {
25 $admin_user = $this->drupalCreateUser(['administer site configuration']);
26 $this->drupalLogin($admin_user);
28 // If we're on Windows, there is no configuration form.
29 if (defined('LOG_LOCAL6')) {
30 $this->drupalPostForm('admin/config/development/logging', ['syslog_facility' => LOG_LOCAL6], t('Save configuration'));
31 $this->assertText(t('The configuration options have been saved.'));
33 $this->drupalGet('admin/config/development/logging');
34 // Should be one field.
35 $field = $this->xpath('//option[@value=:value]', [':value' => LOG_LOCAL6]);
36 $this->assertSame('selected', $field[0]->getAttribute('selected'), 'Facility value saved.');