Rename Predis\Connection\ConnectionFactory.

This commit is contained in:
Daniele Alessandri
2013-12-15 10:09:08 +01:00
parent 278f89924c
commit 2a7607f128
9 changed files with 45 additions and 49 deletions
+7 -9
View File
@@ -12,9 +12,7 @@
namespace Predis;
use PredisTestCase;
use Predis\Connection\ConnectionFactory;
use Predis\Connection\MasterSlaveReplication;
use Predis\Connection\PredisCluster;
use Predis\Connection;
use Predis\Profile;
use Predis\Response;
@@ -152,7 +150,7 @@ class ClientTest extends PredisTestCase
*/
public function testConstructorWithConnectionArgument()
{
$factory = new ConnectionFactory();
$factory = new Connection\Factory();
$connection = $factory->create('tcp://localhost:7000');
$client = new Client($connection);
@@ -170,9 +168,9 @@ class ClientTest extends PredisTestCase
*/
public function testConstructorWithClusterArgument()
{
$cluster = new PredisCluster();
$cluster = new Connection\PredisCluster();
$factory = new ConnectionFactory();
$factory = new Connection\Factory();
$factory->aggregate($cluster, array('tcp://localhost:7000', 'tcp://localhost:7001'));
$client = new Client($cluster);
@@ -186,9 +184,9 @@ class ClientTest extends PredisTestCase
*/
public function testConstructorWithReplicationArgument()
{
$replication = new MasterSlaveReplication();
$replication = new Connection\MasterSlaveReplication();
$factory = new ConnectionFactory();
$factory = new Connection\Factory();
$factory->aggregate($replication, array('tcp://host1?alias=master', 'tcp://host2?alias=slave'));
$client = new Client($replication);
@@ -238,7 +236,7 @@ class ClientTest extends PredisTestCase
*/
public function testConstructorWithNullAndArrayArgument()
{
$factory = $this->getMock('Predis\Connection\ConnectionFactoryInterface');
$factory = $this->getMock('Predis\Connection\FactoryInterface');
$arg2 = array('profile' => '2.0', 'prefix' => 'prefix:', 'connections' => $factory);
$client = new Client(null, $arg2);