public function PatternsIndexesTestCase::setUp in Patterns 7
Same name and namespace in other branches
- 7.2 tests/indexes/indexes.test \PatternsIndexesTestCase::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/
indexes/ indexes.test, line 17 - General SimpleTests for Patterns. Also, a Pattern running base class which uses QuickRun.
Class
- PatternsIndexesTestCase
- @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_components',
'pathauto',
'date',
);
// 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());
}