[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:
Daniele Alessandri
2013-11-30 18:05:56 +01:00
parent 7f690cb62e
commit b253bdc41e
218 changed files with 411 additions and 754 deletions
+3 -20
View File
@@ -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);
}
}