File tree Expand file tree Collapse file tree
tests/system/Database/Live Expand file tree Collapse file tree Original file line number Diff line number Diff 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 ' ;
You can’t perform that action at this time.
0 commit comments