X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=tests%2FDatabaseTest.php;h=9844699b069e86b885a0f3eab393042956648adc;hb=5881fa7229a25efd382668e6cd4a3af0f8d3198c;hp=eb9399ab808a76f5c0b6366f3c2c0b71057bb2b4;hpb=af6dbc654f82225cfc647fe2072662acae388e47;p=friendica.git diff --git a/tests/DatabaseTest.php b/tests/DatabaseTest.php index eb9399ab80..9844699b06 100644 --- a/tests/DatabaseTest.php +++ b/tests/DatabaseTest.php @@ -32,11 +32,15 @@ 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.'); } - return $this->createDefaultDBConnection(DBA::get_db(), getenv('MYSQL_DATABASE')); + return $this->createDefaultDBConnection(DBA::getConnection(), getenv('MYSQL_DATABASE')); } /**