getHost() public method

public getHost ( ) : string
return string
Exemplo n.º 1
0
 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());
 }