Skip to content

Commit 9df6164

Browse files
committed
Add test for driver options in bundle configuration
1 parent 1f93510 commit 9df6164

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Tests/DependencyInjection/AbstractMongoDBExtensionTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ public function testSingleDocumentManagerConfiguration()
107107
'default' => [
108108
'server' => 'mongodb://localhost:27017',
109109
'options' => [],
110+
'driver_options' => ['context' => 'my_context'],
110111
],
111112
],
112113
'document_managers' => ['default' => []],
@@ -121,6 +122,8 @@ public function testSingleDocumentManagerConfiguration()
121122
$this->assertEquals([], $arguments[1]);
122123
$this->assertArrayHasKey('typeMap', $arguments[2]);
123124
$this->assertSame(['root' => 'array', 'document' => 'array'], $arguments[2]['typeMap']);
125+
$this->assertArrayHasKey('context', $arguments[2]);
126+
$this->assertEquals(new Reference('my_context'), $arguments[2]['context']);
124127

125128
$definition = $container->getDefinition('doctrine_mongodb.odm.default_document_manager');
126129
$this->assertEquals('%doctrine_mongodb.odm.document_manager.class%', $definition->getClass());

0 commit comments

Comments
 (0)