getHosts() public method

Get a list of the hosts this connection is connection to
public getHosts ( ) : array
return array
Exemplo n.º 1
0
 /**
  * @depends testParseConnectionString
  */
 public function testGetHosts()
 {
     $connection = new Shanty_Mongo_Connection('mongodb://127.0.0.1:27017/shanty-mongo');
     $hosts = array(array('host' => '127.0.0.1', 'port' => 27017));
     $this->assertEquals($hosts, $connection->getHosts());
 }