Skip to content

Commit ce69558

Browse files
committed
Hopefully better fix for connect test so it will work in Travis
1 parent b0de541 commit ce69558

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

tests/system/Database/Live/ConnectTest.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,11 @@ public function testConnectWithMultipleCustomGroups()
4242

4343
public function testConnectReturnsProvidedConnection()
4444
{
45+
$config = config('Database');
46+
4547
// This will be the tests database
4648
$db = Database::connect();
47-
$this->assertInstanceOf(\CodeIgniter\Database\SQLite3\Connection::class, $db);
49+
$this->assertEquals($config->tests['DBDriver'], $this->getPrivateProperty($db, 'DBDriver'));
4850

4951
// Get an instance of the system's default db so we have something to test with.
5052
$db1 = Database::connect($this->group1);
@@ -57,8 +59,10 @@ public function testConnectReturnsProvidedConnection()
5759

5860
public function testConnectWorksWithGroupName()
5961
{
62+
$config = config('Database');
63+
6064
$db = Database::connect('tests');
61-
$this->assertInstanceOf(\CodeIgniter\Database\SQLite3\Connection::class, $db);
65+
$this->assertEquals($config->tests['DBDriver'], $this->getPrivateProperty($db, 'DBDriver'));
6266

6367
$config = config('Database');
6468
$config->default['DBDriver'] = 'MySQLi';

0 commit comments

Comments
 (0)