File tree Expand file tree Collapse file tree 2 files changed +13
-2
lines changed
tests/unit/Codeception/Module Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -262,7 +262,13 @@ protected function retrieveEntityManager(): void
262
262
);
263
263
}
264
264
265
- $ this ->em ->getConnection ()->getNativeConnection ();
265
+ $ connection = $ this ->em ->getConnection ();
266
+ if (method_exists ($ connection , 'getNativeConnection ' )) {
267
+ $ connection ->getNativeConnection ();
268
+ } else {
269
+ // @phpstan-ignore-next-line
270
+ $ connection ->getWrappedConnection ();
271
+ }
266
272
}
267
273
268
274
/**
Original file line number Diff line number Diff line change @@ -71,7 +71,12 @@ protected function _setUp()
71
71
require_once $ dir . "/CircularRelations/C.php " ;
72
72
require_once $ dir . '/EntityWithUuid.php ' ;
73
73
74
- $ connection = DriverManager::getConnection (['driver ' => 'sqlite3 ' , 'memory ' => true ]);
74
+ $ sqliteDriver = 'sqlite3 ' ;
75
+ if (version_compare (InstalledVersions::getVersion ('doctrine/orm ' ), '3.5 ' , '< ' )) {
76
+ $ sqliteDriver = 'pdo_sqlite ' ;
77
+ }
78
+
79
+ $ connection = DriverManager::getConnection (['driver ' => $ sqliteDriver , 'memory ' => true ]);
75
80
76
81
if (version_compare (InstalledVersions::getVersion ('doctrine/orm ' ), '3 ' , '>= ' )) {
77
82
$ this ->em = new EntityManager (
You can’t perform that action at this time.
0 commit comments