aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/front/controller/admin/ManageShaareControllerTest/DisplayCreateFormTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/front/controller/admin/ManageShaareControllerTest/DisplayCreateFormTest.php')
-rw-r--r--tests/front/controller/admin/ManageShaareControllerTest/DisplayCreateFormTest.php12
1 files changed, 7 insertions, 5 deletions
diff --git a/tests/front/controller/admin/ManageShaareControllerTest/DisplayCreateFormTest.php b/tests/front/controller/admin/ManageShaareControllerTest/DisplayCreateFormTest.php
index 777583d5..2eb95251 100644
--- a/tests/front/controller/admin/ManageShaareControllerTest/DisplayCreateFormTest.php
+++ b/tests/front/controller/admin/ManageShaareControllerTest/DisplayCreateFormTest.php
@@ -4,12 +4,12 @@ declare(strict_types=1);
4 4
5namespace Shaarli\Front\Controller\Admin\ManageShaareControllerTest; 5namespace Shaarli\Front\Controller\Admin\ManageShaareControllerTest;
6 6
7use PHPUnit\Framework\TestCase;
8use Shaarli\Bookmark\Bookmark; 7use Shaarli\Bookmark\Bookmark;
9use Shaarli\Config\ConfigManager; 8use Shaarli\Config\ConfigManager;
10use Shaarli\Front\Controller\Admin\FrontAdminControllerMockHelper; 9use Shaarli\Front\Controller\Admin\FrontAdminControllerMockHelper;
11use Shaarli\Front\Controller\Admin\ManageShaareController; 10use Shaarli\Front\Controller\Admin\ManageShaareController;
12use Shaarli\Http\HttpAccess; 11use Shaarli\Http\HttpAccess;
12use Shaarli\TestCase;
13use Slim\Http\Request; 13use Slim\Http\Request;
14use Slim\Http\Response; 14use Slim\Http\Response;
15 15
@@ -96,12 +96,14 @@ class DisplayCreateFormTest extends TestCase
96 96
97 // Make sure that PluginManager hook is triggered 97 // Make sure that PluginManager hook is triggered
98 $this->container->pluginManager 98 $this->container->pluginManager
99 ->expects(static::at(0)) 99 ->expects(static::atLeastOnce())
100 ->method('executeHooks') 100 ->method('executeHooks')
101 ->withConsecutive(['render_editlink'], ['render_includes'])
101 ->willReturnCallback(function (string $hook, array $data) use ($remoteTitle, $remoteDesc): array { 102 ->willReturnCallback(function (string $hook, array $data) use ($remoteTitle, $remoteDesc): array {
102 static::assertSame('render_editlink', $hook); 103 if ('render_editlink' === $hook) {
103 static::assertSame($remoteTitle, $data['link']['title']); 104 static::assertSame($remoteTitle, $data['link']['title']);
104 static::assertSame($remoteDesc, $data['link']['description']); 105 static::assertSame($remoteDesc, $data['link']['description']);
106 }
105 107
106 return $data; 108 return $data;
107 }) 109 })