setMongo() public method

Set the MongoClient instance to wrap.
Deprecation: 1.1 Will be removed for 2.0
public setMongo ( MongoClient $mongoClient )
$mongoClient MongoClient
Beispiel #1
0
 /**
  * @expectedException InvalidArgumentException
  */
 public function testSetMongoShouldThrowExceptionForInvalidArgument()
 {
     $mongoDB = $this->getMockBuilder('MongoDB')->disableOriginalConstructor()->getMock();
     $conn = new Connection();
     $conn->setMongo($mongoDB);
 }