public function test_set_options()
 {
     $client = new Client();
     $client->addServers(array('127.0.0.1', 11211), array('127.0.0.1', 11212));
     $client->setOptions(array(array(\Memcached::OPT_LIBKETAMA_COMPATIBLE, true), array(\Memcached::OPT_DISTRIBUTION, \Memcached::DISTRIBUTION_CONSISTENT)));
     $this->assertFalse($client->isConnected());
     $this->assertInstanceOf('\\Memcached', $client->getMemcached());
     $this->assertTrue($client->isConnected());
 }
Example #2
0
 public function testThatWeCanConnectToMaster()
 {
     $master = new Client('192.168.50.40', '6379', null, Client::TYPE_REDIS);
     $master->connect();
     $this->assertTrue($master->isConnected(), 'We can connect to the master node');
 }