/** * * @dataProvider getServersDefinitions */ public function testOptionSetServers($servers, $expectedServers) { $options = new SSDBOptions(); $options->setServers($servers); $this->assertEquals($expectedServers, $options->getServers()); }
/** * * @expectedException Zend\Cache\Exception\InvalidArgumentException */ public function testSetServersNoMaster() { $options = new SSDBOptions(); $options->setServers('localhost'); $this->assertAttributeEquals(array(array('host' => 'localhost', 'port' => 8888, 'weight' => 1, 'type' => SSDBOptions::TYPE_SLAVE)), 'servers', $options); }