public function testSetStats() { $stats = new Stats(); $stats->setPid(8991); $cluster = new Cluster(); $cluster->setStats($stats); $this->assertEquals($stats, $cluster->getStats()); }
public function testGetCluster() { $client = new Client(array('c1' => array(array('name' => 'local1', 'host' => 'localhost', 'port' => 11200))), 'MemcachedManager\\Tests\\Fixtures\\MockMemcached'); $node = new Node('localhost', 11200, 'local1'); $node->setAlive(1); $expected = new Cluster('c1'); $expected->addNode($node); $this->assertEquals($expected, $client->getCluster('c1')); }