You are here

public function StateFlowWebTestCaseInstallOnExistingSite::setup in State Machine 7.3

File

modules/state_flow/tests/state_flow.test, line 741
state_flow.test

Class

StateFlowWebTestCaseInstallOnExistingSite
Tests for State Flow when nodes are created before installing state machine.

Code

public function setup() {
  parent::setup();

  // Create a revision for nodes by default.
  foreach (array(
    'page',
    'article',
  ) as $node_type) {
    $node_options = variable_get('node_options_' . $node_type, array(
      'status',
      'promote',
    ));
    $node_options[] = 'revision';
    variable_set('node_options_' . $node_type, $node_options);
  }
  $web_user = $this
    ->drupalCreateUser(array(
    'administer nodes',
    'bypass node access',
    'administer modules',
  ));
  $this
    ->drupalLogin($web_user);
}