public function SchedulerTestBase::commonSettings in Scheduler 7
Common settings and options.
3 calls to SchedulerTestBase::commonSettings()
- SchedulerDateModuleTest::setUp in tests/
scheduler.test - Sets up a Drupal site for running functional and integration tests.
- SchedulerFunctionalTest::setUp in tests/
scheduler.test - Sets up a Drupal site for running functional and integration tests.
- SchedulerRulesTest::setUp in tests/
scheduler.test - Sets up a Drupal site for running functional and integration tests.
File
- tests/
scheduler.test, line 29 - Scheduler module test case file.
Class
- SchedulerTestBase
- Provides common helper methods for Scheduler module tests.
Code
public function commonSettings() {
// Create a 'Basic Page' content type.
$this
->drupalCreateContentType(array(
'type' => 'page',
'name' => t('Basic page'),
));
// Create an administrator user.
// 'access site reports' is required for admin/reports/dblog.
// 'administer site configuration' is required for admin/reports/status.
// 'access content overview' is required for admin/content.
// 'view scheduled content' is required for admin/content/scheduler.
$this->adminUser = $this
->drupalCreateUser(array(
'access content overview',
'access site reports',
'administer nodes',
'administer scheduler',
'administer site configuration',
'create page content',
'delete own page content',
'edit own page content',
'schedule publishing of nodes',
'view scheduled content',
'view own unpublished content',
));
// Add scheduler functionality to the page node type.
variable_set('scheduler_publish_enable_page', 1);
variable_set('scheduler_unpublish_enable_page', 1);
variable_set('scheduler_field_type', 'textfield');
}