public function testGetHostAndPort() { $host = 'localhost'; $port = '123456'; $client = $this->getMock('\\Credis_Client'); $sentinel = new Credis_Sentinel($client); $client->expects($this->once())->method('getHost')->willReturn($host); $client->expects($this->once())->method('getPort')->willReturn($port); $this->assertEquals($host, $sentinel->getHost()); $this->assertEquals($port, $sentinel->getPort()); }