From def39d0dd7a81a4af9ad68b62c9e9823fbc2b38e Mon Sep 17 00:00:00 2001 From: ArthurHoaro Date: Sat, 10 Aug 2019 12:31:32 +0200 Subject: Run Unit Tests against PHP 7.4 Bump PHPUnit version and fix unit test - Globals are handled differently and are persistent through tests - Tests without assertions are marked as risky: some of them are just meant to check that no error is raised. --- tests/updater/UpdaterTest.php | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tests/updater') diff --git a/tests/updater/UpdaterTest.php b/tests/updater/UpdaterTest.php index 93bc86c1..ac87e33c 100644 --- a/tests/updater/UpdaterTest.php +++ b/tests/updater/UpdaterTest.php @@ -724,6 +724,9 @@ $GLOBALS[\'privateLinkByDefault\'] = true;'; */ public function testUpdateMethodWebThumbnailerDisabled() { + if (isset($_SESSION['warnings'])) { + unset($_SESSION['warnings']); + } $this->conf->remove('thumbnails'); $this->conf->set('thumbnail.enable_thumbnails', false); $updater = new Updater([], [], $this->conf, true, $_SESSION); @@ -740,6 +743,9 @@ $GLOBALS[\'privateLinkByDefault\'] = true;'; */ public function testUpdateMethodWebThumbnailerNothingToDo() { + if (isset($_SESSION['warnings'])) { + unset($_SESSION['warnings']); + } $updater = new Updater([], [], $this->conf, true, $_SESSION); $this->assertTrue($updater->updateMethodWebThumbnailer()); $this->assertFalse($this->conf->exists('thumbnail')); -- cgit v1.2.3