public function testUpdateReplaceOne()
{
$document = ['foo' => 'bar', 'bar' => 'foo'];
$this->getCollection()->insert($document);
// Unset ID to re-insert
unset($document['_id']);
$this->getCollection()->insert($document);
$expected = ['ok' => 1.0, 'nModified' => 1, 'n' => 1, 'err' => null, 'errmsg' => null, 'updatedExisting' => true];
$result = $this->getCollection()->update(['foo' => 'bar'], ['foo' => 'foo']);
$this->assertSame($expected, $result);
$this->assertSame(1, $this->getCheckDatabase()->selectCollection('test')->count(['foo' => 'foo']));
$this->assertSame(1, $this->getCheckDatabase()->selectCollection('test')->count(['bar' => 'foo']));
}