/**
* @test
*/
public function it_uses_custom_snapshot_grid_fs_map_and_write_concern()
{
$this->adapter = new MongoDbAdapter($this->client, 'test', ['w' => 'majority', 'j' => true], ['foo' => 'bar']);
$aggregateType = AggregateType::fromString('foo');
$aggregateRoot = new \stdClass();
$aggregateRoot->foo = 'bar';
$time = microtime(true);
if (false === strpos($time, '.')) {
$time .= '.0000';
}
$now = \DateTimeImmutable::createFromFormat('U.u', $time);
$snapshot = new Snapshot($aggregateType, 'id', $aggregateRoot, 1, $now);
$this->adapter->add($snapshot);
$gridFs = $this->client->selectDB('test')->getGridFS('bar');
$file = $gridFs->findOne();
$this->assertNotNull($file);
}