You are here

public function PatternsGeneralTestCase::setUp in Patterns 7

Same name and namespace in other branches
  1. 7.2 tests/general/general.test \PatternsGeneralTestCase::setUp()

Setups the testing environment.

Loads the patterns and libraries modules plus all those that are passed as parameters; skips the Patterns splash screen.

Parameters

array $user_modules The array of modules to enable:

bool $first (optional) If TRUE, the Patterns splash: screen is not skipped.

Overrides PatternsTestCase::setUp

File

tests/general/general.test, line 17
General SimpleTests for Patterns. Also, a Pattern running base class which uses QuickRun.

Class

PatternsGeneralTestCase
@file General SimpleTests for Patterns. Also, a Pattern running base class which uses QuickRun.

Code

public function setUp($user_modules = array(), $first = FALSE) {
  $modules = array(
    'patterns_yamlparser',
  );

  // Enable any modules required for the tests.
  parent::setUp($modules);

  // TODO: how to ensure that Spyc is installed?
  // Create users.
  $this->adm_user = $this
    ->drupalCreateUser(array(
    'administer site configuration',
  ));
  $this->pat_user = $this
    ->drupalCreateUser(array(
    'administer patterns',
  ));
  $this->std_user = $this
    ->drupalCreateUser(array());
}