You are here

function StatisticsProBaseTestCase::setup in Statistics Pro 6.2

Same name and namespace in other branches
  1. 6 tests/statspro.test \StatisticsProBaseTestCase::setup()
2 calls to StatisticsProBaseTestCase::setup()
StatisticsProTestCase::setup in tests/statspro.test
Implementation of setUp().
StatsproTestCase::setup in tests/statspro.test
Implementation of setUp().
2 methods override StatisticsProBaseTestCase::setup()
StatisticsProTestCase::setup in tests/statspro.test
Implementation of setUp().
StatsproTestCase::setup in tests/statspro.test
Implementation of setUp().

File

tests/statspro.test, line 24
Functionality tests for Statistics Pro.

Class

StatisticsProBaseTestCase
Base class for Statistics Pro tests.

Code

function setup() {
  $this->modules = func_get_args();
  call_user_func_array(array(
    'parent',
    'setup',
  ), $this->modules);
  $permissions = array(
    'access comments',
    'access content',
    'post comments',
    'post comments without approval',
  );
  $this->users['regular_1'] = $this
    ->drupalCreateUser($permissions);
  $this->users['regular_2'] = $this
    ->drupalCreateUser($permissions);
  $this->users['regular_3'] = $this
    ->drupalCreateUser($permissions);
  $permissions[] = 'create page content';
  $this->users['create_1'] = $this
    ->drupalCreateUser($permissions);
  $this->users['create_2'] = $this
    ->drupalCreateUser($permissions);
  $permissions[] = 'access statistics pro reports';
  $this->users['stats'] = $this
    ->drupalCreateUser($permissions);
  $permissions[] = 'administer site configuration';
  $permissions[] = 'administer statistics pro settings';
  $this->users['stats_admin'] = $this
    ->drupalCreateUser($permissions);
}