public function amConnectedToDatabase($databaseKey)
    {
        if (empty($this->getDatabases()[$databaseKey]) && $databaseKey != self::DEFAULT_DATABASE) {
            throw new ModuleConfigException(
                __CLASS__,
                "\nNo database $databaseKey in the key databases.\n"
            );
        }
        $this->currentDatabase = $databaseKey;
    }
public function amConnectedToDatabase($databaseKey)
    {
        if (empty($this->getDatabases()[$databaseKey]) && $databaseKey != self::DEFAULT_DATABASE) {
            throw new ModuleConfigException(
                __CLASS__,
                "\nNo database $databaseKey in the key databases.\n"
            );
        }
        $this->currentDatabase = $databaseKey;
    }
public function amConnectedToDatabase ( $ databaseKey ) { if ( empty ( $ this -> getDatabases ( ) [ $ databaseKey ] ) && $ databaseKey != self :: DEFAULT_DATABASE ) { throw new ModuleConfigException ( __CLASS__ , "\nNo database $databaseKey in the key databases.\n" ) ; } $ this -> currentDatabase = $ databaseKey ; }
Make sure you are connected to the right database.

```php
<?php
$I->seeNumRecords(2, 'users');   //executed on default database
$I->amConnectedToDatabase('db_books');
$I->seeNumRecords(30, 'books');  //executed on db_books database
//All the next queries will be on db_books
```
@param $databaseKey
@throws ModuleConfigException
Make sure you are connected to the right database .