예제 #1
0
 /**
  * @group disconnected
  * @todo How should we test for the error callback?
  */
 public function testConstructorWithNullAndArrayArgument()
 {
     $options = array('profile' => '2.0', 'prefix' => 'prefix:', 'eventloop' => $loop = $this->getEventLoop(), 'on_error' => $callback = function ($client, $error) {
     });
     $client = new Client(null, $options);
     $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($loop, $client->getEventLoop());
 }