Skip to content

Commit 8102411

Browse files
authored
Merge pull request #901 from kenjis/update-tests-Config-Registrar
test: update Config\Registrar
2 parents 189017e + 5676a07 commit 8102411

File tree

2 files changed

+6
-11
lines changed

2 files changed

+6
-11
lines changed

phpstan-baseline.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -431,11 +431,6 @@
431431
'count' => 1,
432432
'path' => __DIR__ . '/tests/Unit/UserTest.php',
433433
];
434-
$ignoreErrors[] = [
435-
'message' => '#^Construct empty\\(\\) is not allowed\\. Use more strict comparison\\.$#',
436-
'count' => 1,
437-
'path' => __DIR__ . '/tests/_support/Config/Registrar.php',
438-
];
439434
$ignoreErrors[] = [
440435
'message' => '#^Call to function model with CodeIgniter\\\\Shield\\\\Models\\\\TokenLoginModel\\:\\:class is discouraged\\.$#',
441436
'count' => 1,

tests/_support/Config/Registrar.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class Registrar
3737
'DBDriver' => 'MySQLi',
3838
'DBPrefix' => 'db_',
3939
'pConnect' => false,
40-
'DBDebug' => (ENVIRONMENT !== 'production'),
40+
'DBDebug' => true,
4141
'charset' => 'utf8',
4242
'DBCollat' => 'utf8_general_ci',
4343
'swapPre' => '',
@@ -56,7 +56,7 @@ class Registrar
5656
'DBDriver' => 'Postgre',
5757
'DBPrefix' => 'db_',
5858
'pConnect' => false,
59-
'DBDebug' => (ENVIRONMENT !== 'production'),
59+
'DBDebug' => true,
6060
'charset' => 'utf8',
6161
'DBCollat' => 'utf8_general_ci',
6262
'swapPre' => '',
@@ -75,7 +75,7 @@ class Registrar
7575
'DBDriver' => 'SQLite3',
7676
'DBPrefix' => 'db_',
7777
'pConnect' => false,
78-
'DBDebug' => (ENVIRONMENT !== 'production'),
78+
'DBDebug' => true,
7979
'charset' => 'utf8',
8080
'DBCollat' => 'utf8_general_ci',
8181
'swapPre' => '',
@@ -95,7 +95,7 @@ class Registrar
9595
'DBDriver' => 'SQLSRV',
9696
'DBPrefix' => 'db_',
9797
'pConnect' => false,
98-
'DBDebug' => (ENVIRONMENT !== 'production'),
98+
'DBDebug' => true,
9999
'charset' => 'utf8',
100100
'DBCollat' => 'utf8_general_ci',
101101
'swapPre' => '',
@@ -114,7 +114,7 @@ class Registrar
114114
'DBDriver' => 'OCI8',
115115
'DBPrefix' => 'db_',
116116
'pConnect' => false,
117-
'DBDebug' => (ENVIRONMENT !== 'production'),
117+
'DBDebug' => true,
118118
'charset' => 'utf8',
119119
'DBCollat' => 'utf8_general_ci',
120120
'swapPre' => '',
@@ -136,7 +136,7 @@ public static function Database()
136136

137137
// Under GitHub Actions, we can set an ENV var named 'DB'
138138
// so that we can test against multiple databases.
139-
if (($group = getenv('DB')) && ! empty(self::$dbConfig[$group])) {
139+
if (($group = getenv('DB')) && ! isset(self::$dbConfig[$group])) {
140140
$config['tests'] = self::$dbConfig[$group];
141141
}
142142

0 commit comments

Comments
 (0)