You are here

public function RecipeWebTestBase::setUp in Recipe 7

Same name and namespace in other branches
  1. 7.2 src/Tests/RecipeWebTestBase.php \Drupal\recipe\Tests\RecipeWebTestBase::setUp()

File

src/Tests/RecipeWebTestBase.php, line 27

Class

RecipeWebTestBase
Provides a base class for testing the functionality of the Recipe module.

Namespace

Drupal\recipe\Tests

Code

public function setUp() {

  // Enable modules required for testing.
  parent::setUp(array(
    'recipe',
    'recipe_plaintext',
    'recipe_html',
    'recipe_recipeML',
    'recipe_mastercook4',
    'recipe_test',
  ));

  // Create and log in the admin user with Recipe content permissions.
  $this->adminUser = $this
    ->drupalCreateUser(array(
    'create recipe content',
    'edit any recipe content',
    'import recipes',
    'export recipes',
    'administer site configuration',
    'administer blocks',
  ));
  $this
    ->drupalLogin($this->adminUser);

  // Populate the unit list.
  $this->unitList = recipe_get_units();
}