mirror of
https://github.com/idanoo/php-resque.git
synced 2024-11-24 01:05:13 +00:00
idanoo
80d64e79ff
2.0.0 (2021-02-19) Moved to PSR-4 Namespaced codebase Added more comments throughout Co-Authored-By: idanoo <daniel@m2.nz> Co-Committed-By: idanoo <daniel@m2.nz>
32 lines
747 B
PHP
32 lines
747 B
PHP
<?php
|
|
|
|
namespace Resque\Test;
|
|
|
|
/**
|
|
* Resque test case class. Contains setup and teardown methods.
|
|
*
|
|
* @package Resque/Tests
|
|
* @author Daniel Mason <daniel@m2.nz>
|
|
* @license http://www.opensource.org/licenses/mit-license.php
|
|
*/
|
|
class TestCase extends \PHPUnit\Framework\TestCase
|
|
{
|
|
protected $resque;
|
|
protected $redis;
|
|
|
|
public static function setUpBeforeClass(): void
|
|
{
|
|
date_default_timezone_set('UTC');
|
|
}
|
|
|
|
public function setUp(): void
|
|
{
|
|
// Setup redis connection for testing.
|
|
global $redisTestServer;
|
|
|
|
$this->redis = new \Credis_Client($redisTestServer, '6379');
|
|
\Resque\Resque::setBackend($redisTestServer);
|
|
$this->redis->flushAll();
|
|
}
|
|
}
|