You are here

protected function CacheFlushCronTest::setUp in CacheFlush 7.3

Sets up the test.

Overrides DrupalWebTestCase::setUp

File

modules/cacheflush_cron/cacheflush_cron.test, line 27
Contains test suite for cacheflush cron module.

Class

CacheFlushCronTest
Defines a test for cacheflush Cron module.

Code

protected function setUp() {
  parent::setUp(array(
    'cacheflush_cron',
  ));
  $roles = array(
    'cacheflush create new',
    'cacheflush view own',
    'cacheflush edit own',
    'cacheflush delete own',
  );
  $user = $this
    ->drupalCreateUser($roles);
  $this
    ->drupalLogin($user);
  $entity = entity_create('cacheflush', array(
    'title' => 'CronTest2',
    'status' => 1,
    'menu' => 0,
    'uid' => $user->uid,
  ));
  $entity
    ->save();
  $this->eid = $entity->id;
}