public function setWriteConcern($w, $timeout = 10000)
{
if (!$this->getMongoClient()->setWriteConcern($w, (int) $timeout)) {
throw new Exception('Error setting write concern');
}
return $this;
}
public function testSetWriteConcern() { $this->client->setWriteConcern('majority', 12000); $this->assertEquals(array('w' => 'majority', 'wtimeout' => 12000), $this->client->getWriteConcern()); }