public function CleanerTestBase::cleanerAdminSetUp in Cleaner 7
Basic SetUp method for administrator.
3 calls to CleanerTestBase::cleanerAdminSetUp()
- CleanerTestCacheClearing::setUp in tests/
cleaner_cache.test - Required setup processes before run a tests.
- CleanerTestFilesClearing::setUp in tests/
cleaner_files.test - Required setup processes before run a tests.
- CleanerTestWatchdogClearing::setUp in tests/
cleaner_watchdog.test - Required setup processes before run a tests.
File
- tests/
cleaner_base.test, line 123 - File with a base class for the Cleaner test cases.
Class
- CleanerTestBase
- Class CleanerTestBase.
Code
public function cleanerAdminSetUp() {
// Enable required modules.
parent::setUp('cleaner', 'dblog', 'syslog', 'system');
// Check if all modules has been enabled.
foreach (array(
'cleaner',
'dblog',
'syslog',
'system',
) as $module) {
$this
->assertTrue(module_exists($module));
}
// Create site admin user.
$admin = $this
->cleanerCreateUserWithRole('administrator');
// Check if admin account has been created.
if (!$admin || $admin == NULL) {
$this
->fail("User hasn't been created.");
}
else {
$this
->pass("User has been created successfully.");
}
// Login as site admin user.
$this
->drupalLogin($admin);
}