From 1a8ac737e52cb25a5c346232ee398f5908cee7d7 Mon Sep 17 00:00:00 2001 From: ArthurHoaro Date: Mon, 6 Jul 2020 08:04:35 +0200 Subject: Process main page (linklist) through Slim controller Including a bunch of improvements on the container, and helper used across new controllers. --- tests/updater/UpdaterTest.php | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'tests/updater/UpdaterTest.php') diff --git a/tests/updater/UpdaterTest.php b/tests/updater/UpdaterTest.php index c689982b..afc35aec 100644 --- a/tests/updater/UpdaterTest.php +++ b/tests/updater/UpdaterTest.php @@ -2,7 +2,10 @@ namespace Shaarli\Updater; use Exception; +use Shaarli\Bookmark\BookmarkFileService; +use Shaarli\Bookmark\BookmarkServiceInterface; use Shaarli\Config\ConfigManager; +use Shaarli\History; require_once 'tests/updater/DummyUpdater.php'; require_once 'tests/utils/ReferenceLinkDB.php'; @@ -29,6 +32,12 @@ class UpdaterTest extends \PHPUnit\Framework\TestCase */ protected $conf; + /** @var BookmarkServiceInterface */ + protected $bookmarkService; + + /** @var Updater */ + protected $updater; + /** * Executed before each test. */ @@ -36,6 +45,8 @@ class UpdaterTest extends \PHPUnit\Framework\TestCase { copy('tests/utils/config/configJson.json.php', self::$configFile .'.json.php'); $this->conf = new ConfigManager(self::$configFile); + $this->bookmarkService = new BookmarkFileService($this->conf, $this->createMock(History::class), true); + $this->updater = new Updater([], $this->bookmarkService, $this->conf, true); } /** @@ -167,4 +178,12 @@ class UpdaterTest extends \PHPUnit\Framework\TestCase $updater = new DummyUpdater($updates, array(), $this->conf, true); $updater->update(); } + + public function testUpdateMethodRelativeHomeLinkRename(): void + { + $this->conf->set('general.header_link', '?'); + $this->updater->updateMethodRelativeHomeLink(); + + static::assertSame(); + } } -- cgit v1.2.3