From 4ff703e3691e6cb398e8d208c1f54ed61315e0e8 Mon Sep 17 00:00:00 2001 From: ArthurHoaro Date: Thu, 10 Sep 2020 14:08:19 +0200 Subject: Plugins: do not save metadata along plugin parameters Also prevent the token to be saved. Fixes #1550 --- tests/front/controller/admin/PluginsControllerTest.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'tests/front') 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']) ; -- cgit v1.2.3