Skip to content

Commit 196d5ec

Browse files
committed
Fixing Oracle connection in unit tests
1 parent 45c7cd2 commit 196d5ec

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

phpstan.neon

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ parameters:
1111
- "#expects TheCodingMachine\\\\TDBM\\\\AbstractTDBMObject, object given.#"
1212
- "#should return array<TheCodingMachine\\\\TDBM\\\\AbstractTDBMObject> but returns array<int, object>#"
1313
#- "#expects array<string>, array<int, int|string> given.#"
14-
- "/Parameter #. \\$types of method Doctrine\\\\DBAL\\\\Connection::.*() expects array<int|string>, array<int, Doctrine\\\\DBAL\\\\Types\\\\Type> given./"
14+
- "/Parameter #. \\$types of method Doctrine\\\\DBAL\\\\Connection::.*() expects array<int\\|string>, array<int, Doctrine\\\\DBAL\\\\Types\\\\Type> given./"
1515
- '#Method TheCodingMachine\\TDBM\\NativeWeakrefObjectStorage::get\(\) should return TheCodingMachine\\TDBM\\DbRow\|null but returns object\|null.#'
1616
- '#Method TheCodingMachine\\TDBM\\QueryFactory\\AbstractQueryFactory::.* should return string but returns string\|null.#'
1717
-

tests/ConnectionFactory.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public static function resetDatabase(
5151

5252
$adminConn->getSchemaManager()->dropAndCreateDatabase($dbName);
5353

54-
$dbConnection = self::getConnection();
54+
$dbConnection = $adminConn;
5555
} else {
5656
$connectionParams = array(
5757
'user' => $dbUserName,
@@ -122,7 +122,7 @@ public static function createConnection(
122122
);
123123
$dbConnection = DriverManager::getConnection($connectionParams, $config);
124124
}
125-
125+
126126
return $dbConnection;
127127
}
128128
}

0 commit comments

Comments
 (0)