php-resque/tests/Resque/Tests/TestCase.php
idanoo 80d64e79ff 2.0.0 Add namespacing + PHP8.0 support (#1)
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>
2021-02-19 12:23:32 +13:00

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();
}
}