aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/updater
diff options
context:
space:
mode:
Diffstat (limited to 'tests/updater')
-rw-r--r--tests/updater/UpdaterTest.php14
1 files changed, 6 insertions, 8 deletions
diff --git a/tests/updater/UpdaterTest.php b/tests/updater/UpdaterTest.php
index c801d451..a7dd70bf 100644
--- a/tests/updater/UpdaterTest.php
+++ b/tests/updater/UpdaterTest.php
@@ -2,6 +2,7 @@
2namespace Shaarli\Updater; 2namespace Shaarli\Updater;
3 3
4use Exception; 4use Exception;
5use PHPUnit\Framework\TestCase;
5use Shaarli\Bookmark\BookmarkFileService; 6use Shaarli\Bookmark\BookmarkFileService;
6use Shaarli\Bookmark\BookmarkServiceInterface; 7use Shaarli\Bookmark\BookmarkServiceInterface;
7use Shaarli\Config\ConfigManager; 8use Shaarli\Config\ConfigManager;
@@ -12,7 +13,7 @@ use Shaarli\History;
12 * Class UpdaterTest. 13 * Class UpdaterTest.
13 * Runs unit tests against the updater class. 14 * Runs unit tests against the updater class.
14 */ 15 */
15class UpdaterTest extends \PHPUnit\Framework\TestCase 16class UpdaterTest extends TestCase
16{ 17{
17 /** 18 /**
18 * @var string Path to test datastore. 19 * @var string Path to test datastore.
@@ -194,7 +195,6 @@ class UpdaterTest extends \PHPUnit\Framework\TestCase
194 195
195 public function testUpdateMethodRelativeHomeLinkDoNotRename(): void 196 public function testUpdateMethodRelativeHomeLinkDoNotRename(): void
196 { 197 {
197 $this->updater->setBasePath('/subfolder');
198 $this->conf->set('general.header_link', '~/my-blog'); 198 $this->conf->set('general.header_link', '~/my-blog');
199 199
200 $this->updater->updateMethodRelativeHomeLink(); 200 $this->updater->updateMethodRelativeHomeLink();
@@ -204,8 +204,6 @@ class UpdaterTest extends \PHPUnit\Framework\TestCase
204 204
205 public function testUpdateMethodMigrateExistingNotesUrl(): void 205 public function testUpdateMethodMigrateExistingNotesUrl(): void
206 { 206 {
207 $this->updater->setBasePath('/subfolder');
208
209 $this->updater->updateMethodMigrateExistingNotesUrl(); 207 $this->updater->updateMethodMigrateExistingNotesUrl();
210 208
211 static::assertSame($this->refDB->getLinks()[0]->getUrl(), $this->bookmarkService->get(0)->getUrl()); 209 static::assertSame($this->refDB->getLinks()[0]->getUrl(), $this->bookmarkService->get(0)->getUrl());
@@ -215,9 +213,9 @@ class UpdaterTest extends \PHPUnit\Framework\TestCase
215 static::assertSame($this->refDB->getLinks()[7]->getUrl(), $this->bookmarkService->get(7)->getUrl()); 213 static::assertSame($this->refDB->getLinks()[7]->getUrl(), $this->bookmarkService->get(7)->getUrl());
216 static::assertSame($this->refDB->getLinks()[8]->getUrl(), $this->bookmarkService->get(8)->getUrl()); 214 static::assertSame($this->refDB->getLinks()[8]->getUrl(), $this->bookmarkService->get(8)->getUrl());
217 static::assertSame($this->refDB->getLinks()[9]->getUrl(), $this->bookmarkService->get(9)->getUrl()); 215 static::assertSame($this->refDB->getLinks()[9]->getUrl(), $this->bookmarkService->get(9)->getUrl());
218 static::assertSame('/subfolder/shaare/WDWyig', $this->bookmarkService->get(42)->getUrl()); 216 static::assertSame('/shaare/WDWyig', $this->bookmarkService->get(42)->getUrl());
219 static::assertSame('/subfolder/shaare/WDWyig', $this->bookmarkService->get(41)->getUrl()); 217 static::assertSame('/shaare/WDWyig', $this->bookmarkService->get(41)->getUrl());
220 static::assertSame('/subfolder/shaare/0gCTjQ', $this->bookmarkService->get(10)->getUrl()); 218 static::assertSame('/shaare/0gCTjQ', $this->bookmarkService->get(10)->getUrl());
221 static::assertSame('/subfolder/shaare/PCRizQ', $this->bookmarkService->get(11)->getUrl()); 219 static::assertSame('/shaare/PCRizQ', $this->bookmarkService->get(11)->getUrl());
222 } 220 }
223} 221}