/[drupal]/drupal/modules/syslog/syslog.test
ViewVC logotype

Contents of /drupal/modules/syslog/syslog.test

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.10 - (show annotations) (download) (as text)
Thu Aug 27 07:18:06 2009 UTC (3 months ago) by dries
Branch: MAIN
CVS Tags: DRUPAL-7-0-UNSTABLE-10, DRUPAL-7-0-UNSTABLE-9
Changes since 1.9: +10 -14 lines
File MIME type: text/x-php
- Patch #395378 by Xano: syslog module clean-up and bugfix.
1 <?php
2 // $Id: syslog.test,v 1.9 2009/08/14 14:00:14 webchick Exp $
3
4 class SyslogTestCase extends DrupalWebTestCase {
5 public static function getInfo() {
6 return array(
7 'name' => 'Syslog functionality',
8 'description' => 'Test syslog settings.',
9 'group' => 'Syslog'
10 );
11 }
12
13 function setUp() {
14 parent::setUp('syslog');
15 }
16
17 /**
18 * Test the syslog settings page.
19 */
20 function testSettings() {
21 $admin_user = $this->drupalCreateUser(array('administer site configuration'));
22 $this->drupalLogin($admin_user);
23
24 $edit = array();
25 // If we're on Windows, there is no configuration form.
26 if (defined('LOG_LOCAL6')) {
27 $this->drupalPost('admin/config/development/logging', array('syslog_facility' => LOG_LOCAL6), t('Save configuration'));
28 $this->assertText(t('The configuration options have been saved.'));
29
30 $this->drupalGet('admin/config/development/logging');
31 if ($this->parse()) {
32 $field = $this->xpath('//option[@value="' . LOG_LOCAL6 . '"]'); // Should be one field.
33 $this->assertTrue($field[0]['selected'] == 'selected', t('Facility value saved.'));
34 }
35 }
36 }
37 }

  ViewVC Help
Powered by ViewVC 1.1.2