diff options
Diffstat (limited to 'tests/updater/UpdaterTest.php')
-rw-r--r-- | tests/updater/UpdaterTest.php | 14 |
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 @@ | |||
2 | namespace Shaarli\Updater; | 2 | namespace Shaarli\Updater; |
3 | 3 | ||
4 | use Exception; | 4 | use Exception; |
5 | use PHPUnit\Framework\TestCase; | ||
5 | use Shaarli\Bookmark\BookmarkFileService; | 6 | use Shaarli\Bookmark\BookmarkFileService; |
6 | use Shaarli\Bookmark\BookmarkServiceInterface; | 7 | use Shaarli\Bookmark\BookmarkServiceInterface; |
7 | use Shaarli\Config\ConfigManager; | 8 | use 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 | */ |
15 | class UpdaterTest extends \PHPUnit\Framework\TestCase | 16 | class 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 | } |