aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/front
diff options
context:
space:
mode:
authorArthurHoaro <arthur@hoa.ro>2020-09-12 21:41:24 +0200
committerGitHub <noreply@github.com>2020-09-12 21:41:24 +0200
commit4af591ff3c5db4dea5b6c437527f6f9b12917570 (patch)
tree924ab153d4ae4609e0c073775874f9f11d84d0dc /tests/front
parente809908f9e593b2cec11f72849caa1dae6394451 (diff)
parent4ff703e3691e6cb398e8d208c1f54ed61315e0e8 (diff)
downloadShaarli-4af591ff3c5db4dea5b6c437527f6f9b12917570.tar.gz
Shaarli-4af591ff3c5db4dea5b6c437527f6f9b12917570.tar.zst
Shaarli-4af591ff3c5db4dea5b6c437527f6f9b12917570.zip
Merge pull request #1551 from ArthurHoaro/fix/plugin-save-metadata
Plugins: do not save metadata along plugin parameters
Diffstat (limited to 'tests/front')
-rw-r--r--tests/front/controller/admin/PluginsControllerTest.php5
1 files changed, 3 insertions, 2 deletions
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
32 array_map(function (string $plugin) use ($path) { touch($path . '/' . $plugin); }, static::PLUGIN_NAMES); 32 array_map(function (string $plugin) use ($path) { touch($path . '/' . $plugin); }, static::PLUGIN_NAMES);
33 } 33 }
34 34
35 public function tearDown() 35 public function tearDown(): void
36 { 36 {
37 $path = __DIR__ . '/folder'; 37 $path = __DIR__ . '/folder';
38 array_map(function (string $plugin) use ($path) { unlink($path . '/' . $plugin); }, static::PLUGIN_NAMES); 38 array_map(function (string $plugin) use ($path) { unlink($path . '/' . $plugin); }, static::PLUGIN_NAMES);
@@ -125,6 +125,7 @@ class PluginsControllerTest extends TestCase
125 'parameters_form' => true, 125 'parameters_form' => true,
126 'parameter1' => 'blip', 126 'parameter1' => 'blip',
127 'parameter2' => 'blop', 127 'parameter2' => 'blop',
128 'token' => 'this parameter should not be saved'
128 ]; 129 ];
129 130
130 $request = $this->createMock(Request::class); 131 $request = $this->createMock(Request::class);
@@ -143,7 +144,7 @@ class PluginsControllerTest extends TestCase
143 ->with('save_plugin_parameters', $parameters) 144 ->with('save_plugin_parameters', $parameters)
144 ; 145 ;
145 $this->container->conf 146 $this->container->conf
146 ->expects(static::atLeastOnce()) 147 ->expects(static::exactly(2))
147 ->method('set') 148 ->method('set')
148 ->withConsecutive(['plugins.parameter1', 'blip'], ['plugins.parameter2', 'blop']) 149 ->withConsecutive(['plugins.parameter1', 'blip'], ['plugins.parameter2', 'blop'])
149 ; 150 ;