diff options
author | ArthurHoaro <arthur@hoa.ro> | 2020-06-13 11:22:14 +0200 |
---|---|---|
committer | ArthurHoaro <arthur@hoa.ro> | 2020-07-23 21:19:21 +0200 |
commit | 818b3193ffabec57501e3bdfa997206e3c0671ef (patch) | |
tree | f5a4d3cc23ac367dde617b849561177fc20d767a /tests/front/controller/admin/PostBookmarkControllerTest.php | |
parent | c22fa57a5505fe95fd01860e3d3dfbb089f869cd (diff) | |
download | Shaarli-818b3193ffabec57501e3bdfa997206e3c0671ef.tar.gz Shaarli-818b3193ffabec57501e3bdfa997206e3c0671ef.tar.zst Shaarli-818b3193ffabec57501e3bdfa997206e3c0671ef.zip |
Explicitly define base and asset path in templates
With the new routes, all pages are not all at the same folder level anymore
(e.g. /shaare and /shaare/123), so we can't just use './' everywhere.
The most consistent way to handle this is to prefix all path with the proper variable,
and handle the actual path in controllers.
Diffstat (limited to 'tests/front/controller/admin/PostBookmarkControllerTest.php')
-rw-r--r-- | tests/front/controller/admin/PostBookmarkControllerTest.php | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/tests/front/controller/admin/PostBookmarkControllerTest.php b/tests/front/controller/admin/PostBookmarkControllerTest.php index f00a15c9..69673bd2 100644 --- a/tests/front/controller/admin/PostBookmarkControllerTest.php +++ b/tests/front/controller/admin/PostBookmarkControllerTest.php | |||
@@ -13,7 +13,6 @@ use Shaarli\Security\SessionManager; | |||
13 | use Shaarli\Thumbnailer; | 13 | use Shaarli\Thumbnailer; |
14 | use Slim\Http\Request; | 14 | use Slim\Http\Request; |
15 | use Slim\Http\Response; | 15 | use Slim\Http\Response; |
16 | use Slim\Http\Uri; | ||
17 | 16 | ||
18 | class PostBookmarkControllerTest extends TestCase | 17 | class PostBookmarkControllerTest extends TestCase |
19 | { | 18 | { |
@@ -406,12 +405,6 @@ class PostBookmarkControllerTest extends TestCase | |||
406 | return $parameters[$key] ?? null; | 405 | return $parameters[$key] ?? null; |
407 | }) | 406 | }) |
408 | ; | 407 | ; |
409 | $request->method('getUri')->willReturnCallback(function (): Uri { | ||
410 | $uri = $this->createMock(Uri::class); | ||
411 | $uri->method('getBasePath')->willReturn('/subfolder'); | ||
412 | |||
413 | return $uri; | ||
414 | }); | ||
415 | $response = new Response(); | 408 | $response = new Response(); |
416 | 409 | ||
417 | $checkBookmark = function (Bookmark $bookmark) use ($parameters) { | 410 | $checkBookmark = function (Bookmark $bookmark) use ($parameters) { |
@@ -493,12 +486,6 @@ class PostBookmarkControllerTest extends TestCase | |||
493 | return $parameters[$key] ?? null; | 486 | return $parameters[$key] ?? null; |
494 | }) | 487 | }) |
495 | ; | 488 | ; |
496 | $request->method('getUri')->willReturnCallback(function (): Uri { | ||
497 | $uri = $this->createMock(Uri::class); | ||
498 | $uri->method('getBasePath')->willReturn('/subfolder'); | ||
499 | |||
500 | return $uri; | ||
501 | }); | ||
502 | $response = new Response(); | 489 | $response = new Response(); |
503 | 490 | ||
504 | $checkBookmark = function (Bookmark $bookmark) use ($parameters, $id) { | 491 | $checkBookmark = function (Bookmark $bookmark) use ($parameters, $id) { |
@@ -575,12 +562,6 @@ class PostBookmarkControllerTest extends TestCase | |||
575 | return $parameters[$key] ?? null; | 562 | return $parameters[$key] ?? null; |
576 | }) | 563 | }) |
577 | ; | 564 | ; |
578 | $request->method('getUri')->willReturnCallback(function (): Uri { | ||
579 | $uri = $this->createMock(Uri::class); | ||
580 | $uri->method('getBasePath')->willReturn('/subfolder'); | ||
581 | |||
582 | return $uri; | ||
583 | }); | ||
584 | $response = new Response(); | 565 | $response = new Response(); |
585 | 566 | ||
586 | $this->container->conf = $this->createMock(ConfigManager::class); | 567 | $this->container->conf = $this->createMock(ConfigManager::class); |