2010-04-18 13:58:43 +00:00
|
|
|
<?php
|
2018-05-25 07:26:54 +00:00
|
|
|
|
2010-04-18 13:58:43 +00:00
|
|
|
/**
|
|
|
|
* Resque test case class. Contains setup and teardown methods.
|
|
|
|
*
|
2018-05-25 07:26:54 +00:00
|
|
|
* @package Resque/Tests
|
|
|
|
* @author Chris Boulton <chris@bigcommerce.com>
|
|
|
|
* @license http://www.opensource.org/licenses/mit-license.php
|
2010-04-18 13:58:43 +00:00
|
|
|
*/
|
2018-05-25 07:26:54 +00:00
|
|
|
|
|
|
|
class Resque_Tests_TestCase extends PHPUnit\Framework\TestCase
|
2010-04-18 13:58:43 +00:00
|
|
|
{
|
2018-05-25 07:26:54 +00:00
|
|
|
protected $resque;
|
|
|
|
protected $redis;
|
2010-04-18 13:58:43 +00:00
|
|
|
|
2018-05-25 07:26:54 +00:00
|
|
|
public static function setUpBeforeClass()
|
|
|
|
{
|
|
|
|
date_default_timezone_set('UTC');
|
|
|
|
}
|
2016-10-06 01:49:15 +00:00
|
|
|
|
2018-05-25 07:26:54 +00:00
|
|
|
public function setUp()
|
|
|
|
{
|
2018-05-25 08:11:17 +00:00
|
|
|
// Setup redis connection on DB 9 for testing.
|
2018-05-25 07:53:55 +00:00
|
|
|
$this->redis = new Redis();
|
2018-05-25 07:26:54 +00:00
|
|
|
$this->redis->connect('localhost');
|
2010-04-18 13:58:43 +00:00
|
|
|
|
2018-05-25 08:11:17 +00:00
|
|
|
Resque::setBackend('localhost');
|
2018-05-25 07:26:54 +00:00
|
|
|
$this->redis->flushAll();
|
|
|
|
}
|
2016-10-06 01:49:15 +00:00
|
|
|
}
|