From 8f60e1206e45e67c96a7630d4ff94e72fe875f09 Mon Sep 17 00:00:00 2001 From: ArthurHoaro Date: Sat, 26 Sep 2020 15:08:39 +0200 Subject: Comply with PHPUnit V8: setup/teardown functions must return void --- tests/legacy/LegacyLinkDBTest.php | 2 +- tests/legacy/LegacyLinkFilterTest.php | 2 +- tests/legacy/LegacyUpdaterTest.php | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'tests/legacy') diff --git a/tests/legacy/LegacyLinkDBTest.php b/tests/legacy/LegacyLinkDBTest.php index 0884ad03..92cf607c 100644 --- a/tests/legacy/LegacyLinkDBTest.php +++ b/tests/legacy/LegacyLinkDBTest.php @@ -52,7 +52,7 @@ class LegacyLinkDBTest extends \PHPUnit\Framework\TestCase * * Resets test data for each test */ - protected function setUp() + protected function setUp(): void { if (file_exists(self::$testDatastore)) { unlink(self::$testDatastore); diff --git a/tests/legacy/LegacyLinkFilterTest.php b/tests/legacy/LegacyLinkFilterTest.php index ba9ec529..8223cc15 100644 --- a/tests/legacy/LegacyLinkFilterTest.php +++ b/tests/legacy/LegacyLinkFilterTest.php @@ -34,7 +34,7 @@ class LegacyLinkFilterTest extends \PHPUnit\Framework\TestCase /** * Instantiate linkFilter with ReferenceLinkDB data. */ - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { self::$refDB = new ReferenceLinkDB(true); self::$refDB->write(self::$testDatastore); diff --git a/tests/legacy/LegacyUpdaterTest.php b/tests/legacy/LegacyUpdaterTest.php index 7c429811..9b693dcb 100644 --- a/tests/legacy/LegacyUpdaterTest.php +++ b/tests/legacy/LegacyUpdaterTest.php @@ -40,7 +40,7 @@ class LegacyUpdaterTest extends \PHPUnit\Framework\TestCase /** * Executed before each test. */ - public function setUp() + protected function setUp(): void { copy('tests/utils/config/configJson.json.php', self::$configFile .'.json.php'); $this->conf = new ConfigManager(self::$configFile); @@ -754,7 +754,7 @@ $GLOBALS[\'privateLinkByDefault\'] = true;'; if (isset($_SESSION['warnings'])) { unset($_SESSION['warnings']); } - + $updater = new LegacyUpdater([], [], $this->conf, true, $_SESSION); $this->assertTrue($updater->updateMethodWebThumbnailer()); $this->assertFalse($this->conf->exists('thumbnail')); -- cgit v1.2.3