Browse Source

Skip DB tests if MYSQL_* environment variables are missing

pull/5552/head
Hypolite Petovan 3 years ago
parent
commit
5f48b98505
1 changed files with 4 additions and 0 deletions
  1. +4
    -0
      tests/DatabaseTest.php

+ 4
- 0
tests/DatabaseTest.php View File

@ -32,6 +32,10 @@ abstract class DatabaseTest extends TestCase
*/
protected function getConnection()
{
if (!getenv('MYSQL_DATABASE')) {
$this->markTestSkipped('Please set the MYSQL_* environment variables to your test database credentials.');
}
if (!DBA::connected()) {
$this->markTestSkipped('Could not connect to the database.');
}


Loading…
Cancel
Save