mirror of
https://github.com/predis/predis.git
synced 2026-08-24 15:49:28 +00:00
[tests] Improve the basic framework of our test suite.
We now have a base test case class for Predis (namely PredisTestCase) grouping various commonly used utility methods shared by all of the tests in the suite, greatly improving reusability.
This commit is contained in:
@@ -11,8 +11,7 @@
|
||||
|
||||
namespace Predis\Transaction;
|
||||
|
||||
use PHPUnit_Framework_TestCase as StandardTestCase;
|
||||
|
||||
use PredisTestCase;
|
||||
use Predis\Client;
|
||||
use Predis\Command\CommandInterface;
|
||||
use Predis\Response;
|
||||
@@ -20,7 +19,7 @@ use Predis\Response;
|
||||
/**
|
||||
* @group realm-transaction
|
||||
*/
|
||||
class MultiExecTest extends StandardTestCase
|
||||
class MultiExecTest extends PredisTestCase
|
||||
{
|
||||
/**
|
||||
* @group disconnected
|
||||
@@ -862,22 +861,6 @@ class MultiExecTest extends StandardTestCase
|
||||
*/
|
||||
protected function getClient(array $parameters = array(), array $options = array())
|
||||
{
|
||||
$parameters = array_merge(array(
|
||||
'scheme' => 'tcp',
|
||||
'host' => REDIS_SERVER_HOST,
|
||||
'port' => REDIS_SERVER_PORT,
|
||||
'database' => REDIS_SERVER_DBNUM,
|
||||
), $parameters);
|
||||
|
||||
$options = array_merge(array(
|
||||
'profile' => REDIS_SERVER_VERSION
|
||||
), $options);
|
||||
|
||||
$client = new Client($parameters, $options);
|
||||
|
||||
$client->connect();
|
||||
$client->flushdb();
|
||||
|
||||
return $client;
|
||||
return $this->createClient($parameters, $options);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user