aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/Updater
diff options
context:
space:
mode:
authorArthurHoaro <arthur@hoa.ro>2018-07-05 20:29:55 +0200
committerArthurHoaro <arthur@hoa.ro>2018-07-05 20:34:22 +0200
commitb302b3c584b84f22f0e6f187b072180ecbacdfab (patch)
tree297f72d8fcf6d158ebbb8198dee4e35a30ab0d7e /tests/Updater
parentfcba541e2f12c85ac56c6915ba1319fbdd3e6962 (diff)
downloadShaarli-b302b3c584b84f22f0e6f187b072180ecbacdfab.tar.gz
Shaarli-b302b3c584b84f22f0e6f187b072180ecbacdfab.tar.zst
Shaarli-b302b3c584b84f22f0e6f187b072180ecbacdfab.zip
Thumbnails: add a common mode to only retrieve thumbs from popular media websites
Diffstat (limited to 'tests/Updater')
-rw-r--r--tests/Updater/UpdaterTest.php7
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 @@
2use Shaarli\Config\ConfigJson; 2use Shaarli\Config\ConfigJson;
3use Shaarli\Config\ConfigManager; 3use Shaarli\Config\ConfigManager;
4use Shaarli\Config\ConfigPhp; 4use Shaarli\Config\ConfigPhp;
5use Shaarli\Thumbnailer;
5 6
6require_once 'tests/Updater/DummyUpdater.php'; 7require_once 'tests/Updater/DummyUpdater.php';
7require_once 'inc/rain.tpl.class.php'; 8require_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']));