You are here

function dfpBaseTest::setUp in Doubleclick for Publishers (DFP) 7

Same name and namespace in other branches
  1. 7.2 tests/dfp.test \dfpBaseTest::setUp()

Implementation of setUp().

Overrides DrupalWebTestCase::setUp

File

tests/dfp_base.test, line 12
Base test file for DFP module.

Class

dfpBaseTest
@file Base test file for DFP module.

Code

function setUp() {

  // Enable a couple modules.
  parent::setUp('ctools', 'dfp', 'taxonomy');
  menu_rebuild();

  // Create an admin user with all the permissions needed to run tests.
  $this->admin_user = $this
    ->drupalCreateUser(array(
    'administer DFP',
    'administer taxonomy',
    'access administration pages',
    'administer blocks',
    'bypass node access',
    'administer nodes',
    'edit terms in 1',
  ));
  $this
    ->drupalLogin($this->admin_user);

  // Add the some global settings needed for dfp ads to work.
  variable_set('dfp_network_id', '12345');
  variable_set('dfp_default_slug', $this
    ->randomName(8));
}