@@ -40,7 +40,7 @@ public function testDbalLoad()
40
40
$ container = $ this ->getContainer ();
41
41
$ loader = new DoctrineExtension ();
42
42
43
- $ loader ->load (array (array ('dbal ' => array ('password ' => 'foo ' )), array (), array ('dbal ' => array ('default_connection ' => 'foo ' )), array ()), $ container );
43
+ $ loader ->load (array (array ('dbal ' => array ('connections ' => array ( ' default ' => array ( ' password ' => 'foo ' )) )), array (), array ('dbal ' => array ('default_connection ' => 'foo ' )), array ()), $ container );
44
44
45
45
$ arguments = $ container ->getDefinition ('doctrine.dbal.default_connection ' )->getArguments ();
46
46
$ config = $ arguments [0 ];
@@ -112,7 +112,7 @@ public function testDependencyInjectionConfigurationDefaults()
112
112
$ container = $ this ->getContainer ();
113
113
$ loader = new DoctrineExtension ();
114
114
115
- $ loader ->load (array (array ('dbal ' => array () , 'orm ' => array ('mappings ' => array ('YamlBundle ' => array ())))), $ container );
115
+ $ loader ->load (array (array ('dbal ' => null , ' orm ' => array (' default_entity_manager ' => ' default ' , 'entity_managers ' => array ('default ' => array ( ' mappings ' => array ('YamlBundle ' => array ()) ))))), $ container );
116
116
117
117
$ this ->assertFalse ($ container ->getParameter ('doctrine.orm.auto_generate_proxy_classes ' ));
118
118
$ this ->assertEquals ('Doctrine\ORM\Configuration ' , $ container ->getParameter ('doctrine.orm.configuration_class ' ));
@@ -134,11 +134,16 @@ public function testDependencyInjectionConfigurationDefaults()
134
134
$ config = array (
135
135
'proxy_namespace ' => 'MyProxies ' ,
136
136
'auto_generate_proxy_classes ' => true ,
137
- 'mappings ' => array ('YamlBundle ' => array ()),
137
+ 'default_entity_manager ' => 'default ' ,
138
+ 'entity_managers ' => array (
139
+ 'default ' => array (
140
+ 'mappings ' => array ('YamlBundle ' => array ()),
141
+ )
142
+ )
138
143
F438
);
139
144
140
145
$ container = $ this ->getContainer ();
141
- $ loader ->load (array (array ('dbal ' => array () , 'orm ' => $ config )), $ container );
146
+ $ loader ->load (array (array ('dbal ' => null , 'orm ' => $ config )), $ container );
142
147
143
148
$ definition = $ container ->getDefinition ('doctrine.dbal.default_connection ' );
144
149
$ this ->assertEquals ('Doctrine\DBAL\Connection ' , $ definition ->getClass ());
@@ -186,7 +191,7 @@ public function testSingleEntityManagerConfiguration()
186
191
$ container = $ this ->getContainer ();
187
192
$ loader = new DoctrineExtension ();
188
193
189
- $ loader ->load (array (array ('dbal ' => array () , 'orm ' => array ('mappings ' => array ('YamlBundle ' => array ())))), $ container );
194
+ $ loader ->load (array (array ('dbal ' => null , ' orm ' => array (' default_entity_manager ' => ' default ' , 'entity_managers ' => array ('default ' => array ( ' mappings ' => array ('YamlBundle ' => array ()) ))))), $ container );
190
195
191
196
$ definition = $ container ->getDefinition ('doctrine.dbal.default_connection ' );
192
197
$ this ->assertEquals ('Doctrine\DBAL\Connection ' , $ definition ->getClass ());
@@ -357,7 +362,7 @@ public function testBundleEntityAliases()
357
362
$ container = $ this ->getContainer ();
358
363
$ loader = new DoctrineExtension ();
359
364
360
- $ loader ->load (array (array ('orm ' => array ('mappings ' => array ('YamlBundle ' => array ())))), $ container );
365
+ $ loader ->load (array (array ('orm ' => array ('default_entity_manager ' => ' default ' , ' entity_managers ' => array ( ' default ' => array ( ' mappings ' => array ('YamlBundle ' => array ()) ))))), $ container );
361
366
362
367
$ definition = $ container ->getDefinition ('doctrine.orm.default_configuration ' );
363
368
$ this ->assertDICDefinitionMethodCallOnce ($ definition , 'setEntityNamespaces ' ,
@@ -370,7 +375,7 @@ public function testOverwriteEntityAliases()
370
375
$ container = $ this ->getContainer ();
371
376
$ loader = new DoctrineExtension ();
372
377
373
- $ loader ->load (array (array ('orm ' => array ('mappings ' => array ('YamlBundle ' => array ('alias ' => 'yml ' ))))), $ container );
378
+ $ loader ->load (array (array ('orm ' => array ('default_entity_manager ' => ' default ' , ' entity_managers ' => array ( ' default ' => array ( ' mappings ' => array ('YamlBundle ' => array ('alias ' => 'yml ' )) ))))), $ container );
374
379
375
380
$ definition = $ container ->getDefinition ('doctrine.orm.default_configuration ' );
376
381
$ this ->assertDICDefinitionMethodCallOnce ($ definition , 'setEntityNamespaces ' ,
@@ -383,7 +388,7 @@ public function testYamlBundleMappingDetection()
383
388
$ container = $ this ->getContainer ('YamlBundle ' );
384
389
$ loader = new DoctrineExtension ();
385
390
386
- $ loader ->load (array (array ('orm ' => array ('mappings ' => array ('YamlBundle ' => array ())))), $ container );
391
+ $ loader ->load (array (array ('orm ' => array ('default_entity_manager ' => ' default ' , ' entity_managers ' => array ( ' default ' => array ( ' mappings ' => array ('YamlBundle ' => array ()) ))))), $ container );
387
392
388
393
$ definition = $ container ->getDefinition ('doctrine.orm.default_metadata_driver ' );
389
394
$ this ->assertDICDefinitionMethodCallOnce ($ definition , 'addDriver ' , array (
@@ -397,7 +402,7 @@ public function testXmlBundleMappingDetection()
397
402
$ container = $ this ->getContainer ('XmlBundle ' );
398
403
$ loader = new DoctrineExtension ();
399
404
400
- $ loader ->load (array (array ('orm ' => array ('mappings ' => array ('XmlBundle ' => array ())))), $ container );
405
+ $ loader ->load (array (array ('orm ' => array ('default_entity_manager ' => ' default ' , ' entity_managers ' => array ( ' default ' => array ( ' mappings ' => array ('XmlBundle ' => array ()) ))))), $ container );
401
406
402
407
$ definition = $ container ->getDefinition ('doctrine.orm.default_metadata_driver ' );
403
408
$ this ->assertDICDefinitionMethodCallOnce ($ definition , 'addDriver ' , array (
@@ -411,7 +416,7 @@ public function testAnnotationsBundleMappingDetection()
411
416
$ container = $ this ->getContainer ('AnnotationsBundle ' );
412
417
$ loader = new DoctrineExtension ();
413
418
414
- $ loader ->load (array (array ('orm ' => array ('mappings ' => array ('AnnotationsBundle ' => array ())))), $ container );
419
+ $ loader ->load (array (array ('orm ' => array ('default_entity_manager ' => ' default ' , ' entity_managers ' => array ( ' default ' => array ( ' mappings ' => array ('AnnotationsBundle ' => array ()) ))))), $ container );
415
420
416
421
$ definition = $ container ->getDefinition ('doctrine.orm.default_metadata_driver ' );
417
422
$ this ->assertDICDefinitionMethodCallOnce ($ definition , 'addDriver ' , array (
@@ -426,13 +431,17 @@ public function testOrmMergeConfigs()
426
431
$ loader = new DoctrineExtension ();
427
432
428
433
$ loader ->load (array (array ('orm ' => array (
429
- 'auto_generate_proxy_classes ' => true ,
430
- 'mappings ' => array ('AnnotationsBundle ' => array ())
431
- )),
434
+ 'auto_generate_proxy_classes ' => true ,
435
+ 'default_entity_manager ' => 'default ' ,
436
+ 'entity_managers ' => array (
437
+ 'default ' => array ('mappings ' => array ('AnnotationsBundle ' => array ()))
438
+ ))),
432
439
array ('orm ' => array (
433
440
'auto_generate_proxy_classes ' => false ,
434
- 'mappings ' => array ('XmlBundle ' => array ())
435
- ))), $ container );
441
+ 'default_entity_manager ' => 'default ' ,
442
+ 'entity_managers ' => array (
443
+ 'default ' => array ('mappings ' => array ('XmlBundle ' => array ()))
444
+ )))), $ container );
436
445
437
446
$ definition = $ container ->getDefinition ('doctrine.orm.default_metadata_driver ' );
438
447
$ this ->assertDICDefinitionMethodCallAt (0 , $ definition , 'addDriver ' , array (
@@ -619,7 +628,7 @@ public function testAnnotationsBundleMappingDetectionWithVendorNamespace()
619
628
$ container = $ this ->getContainer ('AnnotationsBundle ' , 'Vendor ' );
620
629
$ loader = new DoctrineExtension ();
621
630
622
- $ loader ->load (array (array ('orm ' => array ('mappings ' => array ('AnnotationsBundle ' => array ())))), $ container );
631
+ $ loader ->load (array (array ('orm ' => array ('default_entity_manager ' => ' default ' , ' entity_managers ' => array ( ' default ' => array ( ' mappings ' => array ('AnnotationsBundle ' => array ()) ))))), $ container );
623
632
624
633
$ calls = $ container ->getDefinition ('doctrine.orm.default_metadata_driver ' )->getMethodCalls ();
625
634
$ this ->assertEquals ('doctrine.orm.default_annotation_metadata_driver ' , (string ) $ calls [0 ][1 ][0 ]);
0 commit comments