You are here

public function PagererTest::setUp in Pagerer 7

Set up.

Overrides PagerFunctionalWebTestCase::setUp

File

./pagerer.test, line 35
Pagerer test case script.

Class

PagererTest
Functional tests for Pagerer.

Code

public function setUp() {

  // Enable required modules.
  $modules = array(
    'dblog',
    'pagerer',
  );
  DrupalWebTestCase::setUp($modules);

  // Insert 300 log messages.
  for ($i = 0; $i < 300; $i++) {
    watchdog('pager_test', $this
      ->randomString(), NULL, WATCHDOG_DEBUG);
  }
  $this->admin_user = $this
    ->drupalCreateUser(array(
    'access site reports',
    'administer site configuration',
  ));
  $this
    ->drupalLogin($this->admin_user);
  $edit = array(
    'name' => 'core_replace',
  );
  $this
    ->drupalPost($this->pagererAdmin . '/add', $edit, 'Create preset');
  $edit = array(
    'core_override_preset' => 'core_replace',
  );
  $this
    ->drupalPost($this->pagererAdmin, $edit, 'Save configuration');
}