File tree 1 file changed +5
-11
lines changed
1 file changed +5
-11
lines changed Original file line number Diff line number Diff line change @@ -227,6 +227,8 @@ protected function onReconfigure(array $settings = []): void
227
227
* Retrieve Entity Manager.
228
228
*
229
229
* EM service is retrieved once and then that instance returned on each call
230
+ *
231
+ * @return \Doctrine\ORM\EntityManagerInterface
230
232
*/
231
233
public function _getEntityManager ()
232
234
{
@@ -256,24 +258,16 @@ public function _getEntityManager()
256
258
*/
257
259
public function _getContainer (): ContainerInterface
258
260
{
259
- $ testContainer = $ this ->getTestContainer ();
260
- if ($ testContainer instanceof ContainerInterface) {
261
- return $ testContainer ;
262
- }
263
-
264
261
$ container = $ this ->kernel ->getContainer ();
265
262
if (!$ container instanceof ContainerInterface) {
266
263
$ this ->fail ('Could not get Symfony container ' );
267
264
}
265
+ if ($ container ->has ('test.service_container ' )) {
266
+ $ container = $ container ->get ('test.service_container ' );
267
+ }
268
268
return $ container ;
269
269
}
270
270
271
- protected function getTestContainer (): ?object
272
- {
273
- $ container = $ this ->kernel ->getContainer ();
274
- return $ container ->get ('test.service_container ' );
275
- }
276
-
277
271
/**
278
272
* Attempts to guess the kernel location.
279
273
* When the Kernel is located, the file is required.
You can’t perform that action at this time.
0 commit comments