diff options
Diffstat (limited to 'tests/Updater')
-rw-r--r-- | tests/Updater/UpdaterTest.php | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/Updater/UpdaterTest.php b/tests/Updater/UpdaterTest.php index 92ff5690..05f4b8e1 100644 --- a/tests/Updater/UpdaterTest.php +++ b/tests/Updater/UpdaterTest.php | |||
@@ -2,6 +2,7 @@ | |||
2 | use Shaarli\Config\ConfigJson; | 2 | use Shaarli\Config\ConfigJson; |
3 | use Shaarli\Config\ConfigManager; | 3 | use Shaarli\Config\ConfigManager; |
4 | use Shaarli\Config\ConfigPhp; | 4 | use Shaarli\Config\ConfigPhp; |
5 | use Shaarli\Thumbnailer; | ||
5 | 6 | ||
6 | require_once 'tests/Updater/DummyUpdater.php'; | 7 | require_once 'tests/Updater/DummyUpdater.php'; |
7 | require_once 'inc/rain.tpl.class.php'; | 8 | require_once 'inc/rain.tpl.class.php'; |
@@ -696,7 +697,7 @@ $GLOBALS[\'privateLinkByDefault\'] = true;'; | |||
696 | $updater = new Updater([], [], $this->conf, true, $_SESSION); | 697 | $updater = new Updater([], [], $this->conf, true, $_SESSION); |
697 | $this->assertTrue($updater->updateMethodWebThumbnailer()); | 698 | $this->assertTrue($updater->updateMethodWebThumbnailer()); |
698 | $this->assertFalse($this->conf->exists('thumbnail')); | 699 | $this->assertFalse($this->conf->exists('thumbnail')); |
699 | $this->assertTrue($this->conf->get('thumbnails.enabled')); | 700 | $this->assertEquals(\Shaarli\Thumbnailer::MODE_ALL, $this->conf->get('thumbnails.mode')); |
700 | $this->assertEquals(125, $this->conf->get('thumbnails.width')); | 701 | $this->assertEquals(125, $this->conf->get('thumbnails.width')); |
701 | $this->assertEquals(90, $this->conf->get('thumbnails.height')); | 702 | $this->assertEquals(90, $this->conf->get('thumbnails.height')); |
702 | $this->assertContains('You have enabled thumbnails', $_SESSION['warnings'][0]); | 703 | $this->assertContains('You have enabled thumbnails', $_SESSION['warnings'][0]); |
@@ -712,7 +713,7 @@ $GLOBALS[\'privateLinkByDefault\'] = true;'; | |||
712 | $updater = new Updater([], [], $this->conf, true, $_SESSION); | 713 | $updater = new Updater([], [], $this->conf, true, $_SESSION); |
713 | $this->assertTrue($updater->updateMethodWebThumbnailer()); | 714 | $this->assertTrue($updater->updateMethodWebThumbnailer()); |
714 | $this->assertFalse($this->conf->exists('thumbnail')); | 715 | $this->assertFalse($this->conf->exists('thumbnail')); |
715 | $this->assertFalse($this->conf->get('thumbnails.enabled')); | 716 | $this->assertEquals(Thumbnailer::MODE_NONE, $this->conf->get('thumbnails.mode')); |
716 | $this->assertEquals(125, $this->conf->get('thumbnails.width')); | 717 | $this->assertEquals(125, $this->conf->get('thumbnails.width')); |
717 | $this->assertEquals(90, $this->conf->get('thumbnails.height')); | 718 | $this->assertEquals(90, $this->conf->get('thumbnails.height')); |
718 | $this->assertTrue(empty($_SESSION['warnings'])); | 719 | $this->assertTrue(empty($_SESSION['warnings'])); |
@@ -726,7 +727,7 @@ $GLOBALS[\'privateLinkByDefault\'] = true;'; | |||
726 | $updater = new Updater([], [], $this->conf, true, $_SESSION); | 727 | $updater = new Updater([], [], $this->conf, true, $_SESSION); |
727 | $this->assertTrue($updater->updateMethodWebThumbnailer()); | 728 | $this->assertTrue($updater->updateMethodWebThumbnailer()); |
728 | $this->assertFalse($this->conf->exists('thumbnail')); | 729 | $this->assertFalse($this->conf->exists('thumbnail')); |
729 | $this->assertTrue($this->conf->get('thumbnails.enabled')); | 730 | $this->assertEquals(Thumbnailer::MODE_COMMON, $this->conf->get('thumbnails.mode')); |
730 | $this->assertEquals(90, $this->conf->get('thumbnails.width')); | 731 | $this->assertEquals(90, $this->conf->get('thumbnails.width')); |
731 | $this->assertEquals(53, $this->conf->get('thumbnails.height')); | 732 | $this->assertEquals(53, $this->conf->get('thumbnails.height')); |
732 | $this->assertTrue(empty($_SESSION['warnings'])); | 733 | $this->assertTrue(empty($_SESSION['warnings'])); |