1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- <?php
- class SyslogTestCase extends DrupalWebTestCase {
- public static function getInfo() {
- return array(
- 'name' => 'Syslog functionality',
- 'description' => 'Test syslog settings.',
- 'group' => 'Syslog'
- );
- }
- function setUp() {
- parent::setUp('syslog');
- }
-
- function testSettings() {
- $admin_user = $this->drupalCreateUser(array('administer site configuration'));
- $this->drupalLogin($admin_user);
- $edit = array();
-
- 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));
- $this->assertTrue($field[0]['selected'] == 'selected', 'Facility value saved.');
- }
- }
- }
- }
|