public function PatternsPathautoTestCase::setUp in Patterns 7
Same name and namespace in other branches
- 7.2 tests/pathauto/pathauto.test \PatternsPathautoTestCase::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/pathauto/ pathauto.test, line 20 
- SimpleTests for the Field component of Patterns.
Class
- PatternsPathautoTestCase
- @file SimpleTests for the Field component of Patterns.
Code
public function setUp($modules = array(), $first = FALSE) {
  $this->pathauto_tests_dir = $this
    ->getPatternsTestDir() . 'pathauto/';
  // Enable any modules required for the tests.
  $modules = array(
    'patterns_components',
    'patterns_yamlparser',
    'pathauto',
  );
  parent::setUp($modules);
  $this->pat_user = $this
    ->drupalCreateUser(array(
    'administer patterns',
    'administer url aliases',
  ));
  // Login the patterns administrator.
  $this
    ->drupalLogin($this->pat_user);
}