summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2008-05-19 19:28:39 +0000
committerDries Buytaert <dries@buytaert.net>2008-05-19 19:28:39 +0000
commit5316c645d2507e3c91bfc4a314b071a55d9be2b4 (patch)
tree914508b7d94bbefe020628da989334839e4f3fab
parentc082e1b8ff110a222cc0934a433aecdd4c906d1e (diff)
downloadbrdo-5316c645d2507e3c91bfc4a314b071a55d9be2b4.tar.gz
brdo-5316c645d2507e3c91bfc4a314b071a55d9be2b4.tar.bz2
- Patch #259871 by pwolanin: clean up system.test.
-rw-r--r--modules/system/system.test16
1 files changed, 7 insertions, 9 deletions
diff --git a/modules/system/system.test b/modules/system/system.test
index a8f947740..859566a88 100644
--- a/modules/system/system.test
+++ b/modules/system/system.test
@@ -2,6 +2,8 @@
// $Id$
class EnableDisableCoreTestCase extends DrupalWebTestCase {
+ protected $admin_user;
+
/**
* Implementation of getInfo().
*/
@@ -19,8 +21,8 @@ class EnableDisableCoreTestCase extends DrupalWebTestCase {
function setUp() {
parent::setUp();
- $admin_user = $this->drupalCreateUser(array('access administration pages', 'administer site configuration'));
- $this->drupalLogin($admin_user);
+ $this->admin_user = $this->drupalCreateUser(array('access administration pages', 'administer site configuration'));
+ $this->drupalLogin($this->admin_user);
}
/**
@@ -28,9 +30,6 @@ class EnableDisableCoreTestCase extends DrupalWebTestCase {
* check for related tables, unistall module, check for related tables.
*/
function testEnableDisable() {
- $admin_user = $this->drupalCreateUser(array('access administration pages', 'administer site configuration'));
- $this->drupalLogin($admin_user);
-
// Enable aggregator, and check tables.
$this->assertModules(array('aggregator'), FALSE);
$this->assertTableCount('aggregator', FALSE);
@@ -67,9 +66,6 @@ class EnableDisableCoreTestCase extends DrupalWebTestCase {
* Attempt to enable translation module without locale enabled.
*/
function testEnableWithoutDependency () {
- $admin_user = $this->drupalCreateUser(array('access administration pages', 'administer site configuration'));
- $this->drupalLogin($admin_user);
-
// Attempt to enable content translation without locale enabled.
$edit = array();
$edit['status[translation]'] = 'translation';
@@ -128,6 +124,8 @@ class EnableDisableCoreTestCase extends DrupalWebTestCase {
}
class IPAddressBlocking extends DrupalWebTestCase {
+ protected $blocking_user;
+
/**
* Implementation of getInfo().
*/
@@ -147,13 +145,13 @@ class IPAddressBlocking extends DrupalWebTestCase {
// Create user.
$this->blocking_user = $this->drupalCreateUser(array('block IP addresses', 'access statistics'));
+ $this->drupalLogin($this->blocking_user);
}
/**
* Tests a variety of user input to confirm correct validation and saving of data.
*/
function testIPAddressValidation() {
- $this->drupalLogin($this->blocking_user);
$this->drupalGet('admin/settings/ip-blocking');
// Block a valid IP address.