You are here

public function Redis_Tests_Queue_QueueUnitTestCase::setUp in Redis 7.3

Sets up unit test environment.

Unlike DrupalWebTestCase::setUp(), DrupalUnitTestCase::setUp() does not install modules because tests are performed without accessing the database. Any required files must be explicitly included by the child class setUp() method.

Overrides Redis_Tests_AbstractUnitTestCase::setUp

File

lib/Redis/Tests/Queue/QueueUnitTestCase.php, line 19

Class

Redis_Tests_Queue_QueueUnitTestCase
Some tests in there credits goes to the redis_queue module. Thanks to their author.

Code

public function setUp() {
  parent::setUp();
  module_load_include('inc', 'system', 'system.queue');
  $this->name = 'redis-queue-test-' . time();
  $this->queue = new Redis_Queue($this->name);
}