Sokil\Mongo\Database::getClient PHP 메소드

getClient() 공개 메소드

public getClient ( ) : Client
리턴 Client
    public function getClient()
    {
        return $this->client;
    }

Usage Example

예제 #1
0
 /**
  * @expectedException \Sokil\Mongo\Exception
  * @expectedExceptionMessage Error setting write concern
  */
 public function testSetWriteConcern_Error()
 {
     $mongoDatabaseMock = $this->getMock('\\MongoDB', array('setWriteConcern'), array($this->database->getClient()->getMongoClient(), 'test'));
     $mongoDatabaseMock->expects($this->once())->method('setWriteConcern')->will($this->returnValue(false));
     $database = new Database($this->database->getClient(), $mongoDatabaseMock);
     $database->setWriteConcern(1);
 }
All Usage Examples Of Sokil\Mongo\Database::getClient