/** * @group disconnected */ public function testConstructorWithNullAndArrayArgument() { $factory = $this->getMock('Predis\\Connection\\ConnectionFactoryInterface'); $arg2 = array('profile' => '2.0', 'prefix' => 'prefix:', 'connections' => $factory); $client = new Client(null, $arg2); $profile = $client->getProfile(); $this->assertSame($profile->getVersion(), ServerProfile::get('2.0')->getVersion()); $this->assertInstanceOf('Predis\\Command\\Processor\\KeyPrefixProcessor', $profile->getProcessor()); $this->assertSame('prefix:', $profile->getProcessor()->getPrefix()); $this->assertSame($factory, $client->getConnectionFactory()); }