]> git.mxchange.org Git - friendica.git/commitdiff
Use correct App mode to disable logging
authorHypolite Petovan <mrpetovan@gmail.com>
Wed, 4 Jul 2018 01:24:16 +0000 (21:24 -0400)
committerHypolite Petovan <mrpetovan@gmail.com>
Wed, 4 Jul 2018 01:24:16 +0000 (21:24 -0400)
- Restore normal mode after DBStructure update
- Improve error message in case of missing DB connection

tests/DatabaseTest.php

index fd1c90bc615081c21560611eace956fa041e8f93..73165f10a41c1b1024106ac6fb87be0d7b80a3d8 100644 (file)
@@ -87,12 +87,14 @@ abstract class DatabaseTest extends TestCase
                        if (dba::$connected) {
                                $app = get_app();
                                // We need to do this in order to disable logging
-                               $app->module = 'install';
+                               $app->mode = \Friendica\App::MODE_INSTALL;
 
                                // Create database structure
                                DBStructure::update(false, true, true);
+
+                               $app->mode = \Friendica\App::MODE_NORMAL;
                        } else {
-                               $this->markTestSkipped('Could not connect to the database.');
+                               $this->markTestSkipped('Could not connect to the database. Please check the MYSQL_* environment variables.');
                        }
                }