diff options
Diffstat (limited to 'tests/front/controller/admin/ManageShaareControllerTest/DisplayCreateFormTest.php')
-rw-r--r-- | tests/front/controller/admin/ManageShaareControllerTest/DisplayCreateFormTest.php | 12 |
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 | ||
5 | namespace Shaarli\Front\Controller\Admin\ManageShaareControllerTest; | 5 | namespace Shaarli\Front\Controller\Admin\ManageShaareControllerTest; |
6 | 6 | ||
7 | use PHPUnit\Framework\TestCase; | ||
8 | use Shaarli\Bookmark\Bookmark; | 7 | use Shaarli\Bookmark\Bookmark; |
9 | use Shaarli\Config\ConfigManager; | 8 | use Shaarli\Config\ConfigManager; |
10 | use Shaarli\Front\Controller\Admin\FrontAdminControllerMockHelper; | 9 | use Shaarli\Front\Controller\Admin\FrontAdminControllerMockHelper; |
11 | use Shaarli\Front\Controller\Admin\ManageShaareController; | 10 | use Shaarli\Front\Controller\Admin\ManageShaareController; |
12 | use Shaarli\Http\HttpAccess; | 11 | use Shaarli\Http\HttpAccess; |
12 | use Shaarli\TestCase; | ||
13 | use Slim\Http\Request; | 13 | use Slim\Http\Request; |
14 | use Slim\Http\Response; | 14 | use 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 | }) |