X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;ds=inline;f=tests%2Ffront%2Fcontroller%2Fadmin%2FPluginsControllerTest.php;h=9526474c906e454d6c9672c2e61c8294a7a61326;hb=cdb96276c1f4a1b3484ac4a1729fa5c9cdff38a5;hp=5b59285c9916486bdb5719f54c69fcfb94332127;hpb=af41d5ab5d2bd3ba64d052c997bc6afa6966a63c;p=github%2Fshaarli%2FShaarli.git diff --git a/tests/front/controller/admin/PluginsControllerTest.php b/tests/front/controller/admin/PluginsControllerTest.php index 5b59285c..9526474c 100644 --- a/tests/front/controller/admin/PluginsControllerTest.php +++ b/tests/front/controller/admin/PluginsControllerTest.php @@ -32,7 +32,7 @@ class PluginsControllerTest extends TestCase array_map(function (string $plugin) use ($path) { touch($path . '/' . $plugin); }, static::PLUGIN_NAMES); } - public function tearDown() + public function tearDown(): void { $path = __DIR__ . '/folder'; array_map(function (string $plugin) use ($path) { unlink($path . '/' . $plugin); }, static::PLUGIN_NAMES); @@ -125,6 +125,7 @@ class PluginsControllerTest extends TestCase 'parameters_form' => true, 'parameter1' => 'blip', 'parameter2' => 'blop', + 'token' => 'this parameter should not be saved' ]; $request = $this->createMock(Request::class); @@ -143,7 +144,7 @@ class PluginsControllerTest extends TestCase ->with('save_plugin_parameters', $parameters) ; $this->container->conf - ->expects(static::atLeastOnce()) + ->expects(static::exactly(2)) ->method('set') ->withConsecutive(['plugins.parameter1', 'blip'], ['plugins.parameter2', 'blop']) ;