getStatus() public méthode

public getStatus ( )
Exemple #1
0
 /**
  * @covers Imbo\Database\MongoDB::getStatus
  */
 public function testGetStatusWhenMongoIsConnectable()
 {
     $this->mongoClient->expects($this->once())->method('connect')->will($this->returnValue(true));
     $this->assertTrue($this->driver->getStatus());
 }
Exemple #2
0
 /**
  * @covers Imbo\Database\MongoDB::getStatus
  */
 public function testReturnsFalseWhenFetchingStatusAndTheHostnameIsNotCorrect()
 {
     $db = new MongoDB(array('server' => 'foobar'));
     $this->assertFalse($db->getStatus());
 }