public function testLibOptionsSet() { $options = new MemcacheDbOptions(); $options->setLibOptions(array('COMPRESSION' => false)); $this->assertEquals($options->getLibOption(\Memcached::OPT_COMPRESSION), false); $memcached = new MemcacheDb($options); $this->assertEquals($memcached->getOptions()->getLibOptions(), array(\Memcached::OPT_COMPRESSION => false)); }
public function testGetSlaves() { $options = new MemcacheDbOptions(); $options->addServer('localhost'); $this->assertEquals(array(array('host' => 'localhost', 'port' => 21201, 'weight' => 0, 'type' => MemcacheDbOptions::TYPE_SLAVE)), $options->getSlaveServers()); }