]> git.mxchange.org Git - friendica.git/blobdiff - tests/DatabaseTest.php
Skip DB tests if MYSQL_* environment variables are missing
[friendica.git] / tests / DatabaseTest.php
index 88cc2d84bac1f43371e440e243bfb096e4662745..9844699b069e86b885a0f3eab393042956648adc 100644 (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.');
                }