public function ConfigurationUITest::setUp in Configuration Management 7.2
Same name and namespace in other branches
- 7 tests/configuration.test \ConfigurationUITest::setUp()
Set up test.
Overrides ConfigurationUIWebTestCase::setUp
File
- ui/
tests/ configuration_ui.test, line 48 - Tests for Configuration Management
Class
Code
public function setUp($modules = array()) {
if (empty($modules)) {
parent::setUp(array(
'configuration_ui',
'field',
'filter',
'image',
'taxonomy',
));
}
else {
parent::setUp($modules);
}
$this->components = array(
'content-type' => 'Content type',
'field' => 'Field',
'image-style' => 'Image style',
'variables' => 'Variable',
'permission' => 'Permission',
'vocabulary' => 'Vocabulary',
);
$this->configurations = array(
'variable.node_options_article',
'variable.node_preview_article',
'variable.node_submitted_article',
'variable.comment_default_per_page_article',
'variable.comment_form_location_article',
'variable.comment_preview_article',
'variable.comment_subject_field_article',
'content_type.article',
'field.node.body.article',
'vocabulary.tags',
'field.node.field_tags.article',
'image_style.large',
'image_style.medium',
'field.node.field_image.article',
'permission.create_article_content',
'permission.edit_own_article_content',
'permission.edit_any_article_content',
'permission.delete_own_article_content',
'permission.delete_any_article_content',
);
// Creates all the variables for the content type Article.
$web_user = $this
->drupalCreateUser(array(
'administer configuration management',
'administer content types',
'administer comments',
'administer menu',
'post comments',
));
$this
->drupalLogin($web_user);
// Save the content type to force to save the variables in the database.
$edit = array();
$this
->drupalPost('admin/structure/types/manage/article', $edit, t('Save content type'));
}