public function testLibOptionsSet() { $options = new SSDBOptions(); $options->setLibOptions(array('COMPRESSION' => false)); $this->assertEquals($options->getLibOption(\SSDB::OPT_COMPRESSION), false); $SSDB = new SSDB($options); $this->assertEquals($SSDB->getOptions()->getLibOptions(), array(\SSDB::OPT_COMPRESSION => false)); }
public function testGetSlaves() { $options = new SSDBOptions(); $options->addServer('localhost'); $this->assertEquals(array(array('host' => '127.0.0.1', 'port' => 8888, 'weight' => 0, 'type' => SSDBOptions::TYPE_MASTER), array('host' => '127.0.0.1', 'port' => 8888, 'weight' => 0, 'type' => SSDBOptions::TYPE_SLAVE), array('host' => 'localhost', 'port' => 8888, 'weight' => 0, 'type' => SSDBOptions::TYPE_SLAVE)), $options->getSlaveServers()); }