From: Hypolite Petovan Date: Sat, 4 Aug 2018 14:35:31 +0000 (+0200) Subject: Skip DB tests if MYSQL_* environment variables are missing X-Git-Tag: 2018.09~1^2~166^2 X-Git-Url: https://reisub.nsupdate.info/git/?a=commitdiff_plain;h=5f48b985056867da8b758efe3fb9a17b63ed9bc8;hp=810c108297519746bfcd5b81991d3db0ab2306e9;p=friendica.git%2F.git Skip DB tests if MYSQL_* environment variables are missing --- diff --git a/tests/DatabaseTest.php b/tests/DatabaseTest.php index 88cc2d84ba..9844699b06 100644 --- a/tests/DatabaseTest.php +++ b/tests/DatabaseTest.php @@ -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.'); }