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