X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=tests%2FDatabaseTest.php;h=9844699b069e86b885a0f3eab393042956648adc;hb=ffd2014257b6e5865f626f5064e5e2d3af754fdb;hp=eb9399ab808a76f5c0b6366f3c2c0b71057bb2b4;hpb=4f2ae8868431952bd3acda1537ee899740cbf205;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')); } /**