diff options
author | ArthurHoaro <arthur@hoa.ro> | 2019-08-10 12:31:32 +0200 |
---|---|---|
committer | ArthurHoaro <arthur@hoa.ro> | 2020-01-17 18:34:37 +0100 |
commit | def39d0dd7a81a4af9ad68b62c9e9823fbc2b38e (patch) | |
tree | 676b02604ae6f358ddb90c59c549465f6e9d6214 /tests/updater | |
parent | ef028857531a6abe2d7180538b8510502ee2a467 (diff) | |
download | Shaarli-def39d0dd7a81a4af9ad68b62c9e9823fbc2b38e.tar.gz Shaarli-def39d0dd7a81a4af9ad68b62c9e9823fbc2b38e.tar.zst Shaarli-def39d0dd7a81a4af9ad68b62c9e9823fbc2b38e.zip |
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.
Diffstat (limited to 'tests/updater')
-rw-r--r-- | tests/updater/UpdaterTest.php | 6 |
1 files changed, 6 insertions, 0 deletions
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;'; | |||
724 | */ | 724 | */ |
725 | public function testUpdateMethodWebThumbnailerDisabled() | 725 | public function testUpdateMethodWebThumbnailerDisabled() |
726 | { | 726 | { |
727 | if (isset($_SESSION['warnings'])) { | ||
728 | unset($_SESSION['warnings']); | ||
729 | } | ||
727 | $this->conf->remove('thumbnails'); | 730 | $this->conf->remove('thumbnails'); |
728 | $this->conf->set('thumbnail.enable_thumbnails', false); | 731 | $this->conf->set('thumbnail.enable_thumbnails', false); |
729 | $updater = new Updater([], [], $this->conf, true, $_SESSION); | 732 | $updater = new Updater([], [], $this->conf, true, $_SESSION); |
@@ -740,6 +743,9 @@ $GLOBALS[\'privateLinkByDefault\'] = true;'; | |||
740 | */ | 743 | */ |
741 | public function testUpdateMethodWebThumbnailerNothingToDo() | 744 | public function testUpdateMethodWebThumbnailerNothingToDo() |
742 | { | 745 | { |
746 | if (isset($_SESSION['warnings'])) { | ||
747 | unset($_SESSION['warnings']); | ||
748 | } | ||
743 | $updater = new Updater([], [], $this->conf, true, $_SESSION); | 749 | $updater = new Updater([], [], $this->conf, true, $_SESSION); |
744 | $this->assertTrue($updater->updateMethodWebThumbnailer()); | 750 | $this->assertTrue($updater->updateMethodWebThumbnailer()); |
745 | $this->assertFalse($this->conf->exists('thumbnail')); | 751 | $this->assertFalse($this->conf->exists('thumbnail')); |