From b4f3a2c8aadec8c4b119fbdf47de3868c15cb9c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maur=C3=ADcio=20Meneghini=20Fauth?= Date: Wed, 2 Jun 2021 14:53:17 -0300 Subject: [PATCH] Fix some failing PHPUnit tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: MaurĂ­cio Meneghini Fauth --- phpunit.xml.dist | 2 -- test/classes/ConfigTest.php | 7 ------- test/classes/Controllers/ExportTemplateControllerTest.php | 1 + test/classes/Controllers/Table/ReplaceControllerTest.php | 1 + test/classes/Server/PluginsTest.php | 1 + 5 files changed, 3 insertions(+), 9 deletions(-) diff --git a/phpunit.xml.dist b/phpunit.xml.dist index a3984cb7a1..a9be34df1a 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -2,8 +2,6 @@ diff --git a/test/classes/ConfigTest.php b/test/classes/ConfigTest.php index 3e6e8842a3..8505a92b7f 100644 --- a/test/classes/ConfigTest.php +++ b/test/classes/ConfigTest.php @@ -39,13 +39,6 @@ use const PHP_OS; class ConfigTest extends AbstractTestCase { - /** - * Turn off backup globals - * - * @var bool - */ - protected $backupGlobals = false; - /** @var Config */ protected $object; diff --git a/test/classes/Controllers/ExportTemplateControllerTest.php b/test/classes/Controllers/ExportTemplateControllerTest.php index 7cea162f0d..be884bb757 100644 --- a/test/classes/Controllers/ExportTemplateControllerTest.php +++ b/test/classes/Controllers/ExportTemplateControllerTest.php @@ -43,6 +43,7 @@ class ExportTemplateControllerTest extends AbstractTestCase $_SESSION['relation'][$GLOBALS['server']] = [ 'version' => Version::VERSION, 'exporttemplateswork' => true, + 'trackingwork' => false, 'db' => 'db', 'export_templates' => 'table', ]; diff --git a/test/classes/Controllers/Table/ReplaceControllerTest.php b/test/classes/Controllers/Table/ReplaceControllerTest.php index 50918f6b9a..b85c34ef53 100644 --- a/test/classes/Controllers/Table/ReplaceControllerTest.php +++ b/test/classes/Controllers/Table/ReplaceControllerTest.php @@ -46,6 +46,7 @@ class ReplaceControllerTest extends AbstractTestCase 'bookmark' => 'bookmark', 'uiprefswork' => 'uiprefswork', 'table_uiprefs' => 'table_uiprefs', + 'trackingwork' => false, ]; } diff --git a/test/classes/Server/PluginsTest.php b/test/classes/Server/PluginsTest.php index 4d89cf081e..6f610d2a03 100644 --- a/test/classes/Server/PluginsTest.php +++ b/test/classes/Server/PluginsTest.php @@ -81,6 +81,7 @@ class PluginsTest extends AbstractTestCase public function testGetAuthentication(): void { + $GLOBALS['server'] = 0; $this->plugins = new Plugins($GLOBALS['dbi']); $plugins = $this->plugins->getAuthentication(); $this->assertIsArray($plugins);