public function SpacesDashboardTestCase::setUp in Spaces 6.3
Same name and namespace in other branches
- 7.3 spaces_dashboard/tests/spaces_dashboard.test \SpacesDashboardTestCase::setUp()
- 7 spaces_dashboard/tests/spaces_dashboard.test \SpacesDashboardTestCase::setUp()
Set up test.
Overrides DrupalWebTestCase::setUp
File
- spaces_dashboard/
tests/ spaces_dashboard.test, line 18
Class
Code
public function setUp() {
parent::setUp('context', 'context_ui', 'ctools', 'features', 'jquery_ui', 'spaces', 'spaces_dashboard');
// Use context to ensure the Dashboard editor block is visible for our tests.
ctools_include('export');
$context = ctools_export_new_object('context');
$context->name = 'testcontext';
$context->conditions = array(
'sitewide' => array(
'values' => array(
1,
),
),
);
$context->reactions = array(
'block' => array(
'blocks' => array(
'spaces_dashboard-editor' => array(
'module' => 'spaces_dashboard',
'delta' => 'editor',
'region' => 'right',
'weight' => 0,
),
),
),
);
$saved = context_save($context);
$this
->assertTrue($saved, "Context 'testcontext' saved.");
$admin_user = $this
->drupalCreateUser(array(
'administer site configuration',
'administer dashboards',
));
$this
->drupalLogin($admin_user);
}