Skip to content

Commit 8dceca2

Browse files
authored
Merge pull request #4705 from jeromegamez/db-test-utils
Check for configured instead of hard-coded database in DbUtilsTest
2 parents 43380ef + 6527870 commit 8dceca2

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

tests/system/Database/Live/DbUtilsTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ public function testUtilsListDatabases()
7979
{
8080
$databases = $util->listDatabases();
8181

82-
$this->assertTrue(in_array('test', $databases, true));
82+
$this->assertTrue(in_array($this->db->getDatabase(), $databases, true));
8383
}
8484
elseif ($this->db->DBDriver === 'SQLite3')
8585
{
@@ -98,7 +98,7 @@ public function testUtilsDatabaseExist()
9898

9999
if (in_array($this->db->DBDriver, ['MySQLi', 'Postgre', 'SQLSRV'], true))
100100
{
101-
$exist = $util->databaseExists('test');
101+
$exist = $util->databaseExists($this->db->getDatabase());
102102

103103
$this->assertTrue($exist);
104104
}
@@ -107,7 +107,7 @@ public function testUtilsDatabaseExist()
107107
$this->expectException(DatabaseException::class);
108108
$this->expectExceptionMessage('Unsupported feature of the database platform you are using.');
109109

110-
$util->databaseExists('test');
110+
$util->databaseExists($this->db->getDatabase());
111111
}
112112
}
113113

0 commit comments

Comments
 (0)