public function testUpdateWriteConcern() { $this->setExpectedException('MongoWriteConcernException', "cannot use 'w' > 1 when a host is not replicated"); $this->getCollection()->update([], ['$set' => ['foo' => 'bar']], ['w' => 2]); }