]> git.mxchange.org Git - friendica.git/commitdiff
Skip DB tests if MYSQL_* environment variables are missing
authorHypolite Petovan <mrpetovan@gmail.com>
Sat, 4 Aug 2018 14:35:31 +0000 (16:35 +0200)
committerHypolite Petovan <mrpetovan@gmail.com>
Sat, 4 Aug 2018 14:35:31 +0000 (16:35 +0200)
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.');
                }