php-resque/test/Resque/Tests/TestCase.php

31 lines
724 B
PHP
Raw Normal View History

2010-04-18 13:58:43 +00:00
<?php
2010-04-18 13:58:43 +00:00
/**
* Resque test case class. Contains setup and teardown methods.
*
* @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
*/
class Resque_Tests_TestCase extends PHPUnit\Framework\TestCase
2010-04-18 13:58:43 +00:00
{
protected $resque;
protected $redis;
2010-04-18 13:58:43 +00:00
public static function setUpBeforeClass()
{
date_default_timezone_set('UTC');
}
public function setUp()
{
2018-05-30 07:05:13 +00:00
// Setup redis connection for testing.
2019-06-02 10:21:42 +00:00
global $redisTestServer;
$this->redis = new Credis_Client($redisTestServer, '6379');
Resque::setBackend($redisTestServer);
$this->redis->flushAll();
}
}