You are here

public function ConfigurationApiTest::setUp in Configuration Management 7.2

Set up test.

Overrides ConfigurationWebTestCase::setUp

File

tests/configuration.test, line 48
Tests for Configuration Management

Class

ConfigurationApiTest

Code

public function setUp($modules = array()) {
  if (empty($modules)) {
    parent::setUp(array(
      'configuration',
      'field',
      'filter',
      'image',
      'taxonomy',
    ));
  }
  else {
    parent::setUp($modules);
  }
  $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 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'));
}