Skip to content

Commit

Permalink
Fix database listing test
Browse files Browse the repository at this point in the history
Travis uses `servidor_test` for its database name, and it's not
unreasonable to suggest other people could use different ones too,
so this asserts for more concrete examples including the current db.
  • Loading branch information
dshoreman committed Oct 8, 2019
1 parent d355605 commit e439e02
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tests/Unit/DatabaseTest.php
Expand Up @@ -19,9 +19,13 @@ public function it_can_connect()
/** @test */
public function it_can_list_databases()
{
$db = config('database.connections.mysql.database');
$list = (new Database())->listDatabases();

$this->assertIsArray($list);
$this->assertContains('servidor', $list);
$this->assertContains($db, $list);
$this->assertContains('information_schema', $list);
$this->assertContains('performance_schema', $list);
$this->assertContains('mysql', $list);
}
}

0 comments on commit e439e02

Please sign in to comment.