aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorVirtualTam <virtualtam@flibidi.net>2016-08-13 14:48:51 +0200
committerGitHub <noreply@github.com>2016-08-13 14:48:51 +0200
commit8758bb0ac8cb68d32122009dbcb977d2f0fad2b0 (patch)
tree586fe98bd463424e152232cb66bee0465e7c74b5 /tests
parenteec3666ba60b20f1db054102ccbd618d3bb79594 (diff)
parent876533e86801246bef893e7124ce044ebf33239f (diff)
downloadShaarli-8758bb0ac8cb68d32122009dbcb977d2f0fad2b0.tar.gz
Shaarli-8758bb0ac8cb68d32122009dbcb977d2f0fad2b0.tar.zst
Shaarli-8758bb0ac8cb68d32122009dbcb977d2f0fad2b0.zip
Merge pull request #619 from ArthurHoaro/plugins/param-desc
Add a description to plugin parameters
Diffstat (limited to 'tests')
-rw-r--r--tests/PluginManagerTest.php10
-rw-r--r--tests/config/ConfigPluginTest.php12
-rw-r--r--tests/plugins/test/test.meta4
3 files changed, 17 insertions, 9 deletions
diff --git a/tests/PluginManagerTest.php b/tests/PluginManagerTest.php
index c7511051..ddf48185 100644
--- a/tests/PluginManagerTest.php
+++ b/tests/PluginManagerTest.php
@@ -79,8 +79,14 @@ class PluginManagerTest extends PHPUnit_Framework_TestCase
79 $this->pluginManager->load(array(self::$pluginName)); 79 $this->pluginManager->load(array(self::$pluginName));
80 80
81 $expectedParameters = array( 81 $expectedParameters = array(
82 'pop' => '', 82 'pop' => array(
83 'hip' => '', 83 'value' => '',
84 'desc' => 'pop description',
85 ),
86 'hip' => array(
87 'value' => '',
88 'desc' => '',
89 ),
84 ); 90 );
85 $meta = $this->pluginManager->getPluginsMeta(); 91 $meta = $this->pluginManager->getPluginsMeta();
86 $this->assertEquals('test plugin', $meta[self::$pluginName]['description']); 92 $this->assertEquals('test plugin', $meta[self::$pluginName]['description']);
diff --git a/tests/config/ConfigPluginTest.php b/tests/config/ConfigPluginTest.php
index 716631b0..3b37cd79 100644
--- a/tests/config/ConfigPluginTest.php
+++ b/tests/config/ConfigPluginTest.php
@@ -101,9 +101,9 @@ class ConfigPluginTest extends PHPUnit_Framework_TestCase
101 $plugins = array( 101 $plugins = array(
102 'plugin_name' => array( 102 'plugin_name' => array(
103 'parameters' => array( 103 'parameters' => array(
104 'param1' => true, 104 'param1' => array('value' => true),
105 'param2' => false, 105 'param2' => array('value' => false),
106 'param3' => '', 106 'param3' => array('value' => ''),
107 ) 107 )
108 ) 108 )
109 ); 109 );
@@ -114,8 +114,8 @@ class ConfigPluginTest extends PHPUnit_Framework_TestCase
114 ); 114 );
115 115
116 $result = load_plugin_parameter_values($plugins, $parameters); 116 $result = load_plugin_parameter_values($plugins, $parameters);
117 $this->assertEquals('value1', $result['plugin_name']['parameters']['param1']); 117 $this->assertEquals('value1', $result['plugin_name']['parameters']['param1']['value']);
118 $this->assertEquals('value2', $result['plugin_name']['parameters']['param2']); 118 $this->assertEquals('value2', $result['plugin_name']['parameters']['param2']['value']);
119 $this->assertEquals('', $result['plugin_name']['parameters']['param3']); 119 $this->assertEquals('', $result['plugin_name']['parameters']['param3']['value']);
120 } 120 }
121} 121}
diff --git a/tests/plugins/test/test.meta b/tests/plugins/test/test.meta
index ab999ed4..26f243f0 100644
--- a/tests/plugins/test/test.meta
+++ b/tests/plugins/test/test.meta
@@ -1,2 +1,4 @@
1description="test plugin" 1description="test plugin"
2parameters="pop;hip" \ No newline at end of file 2parameters="pop;hip"
3parameter.pop="pop description"
4parameter.hip= \ No newline at end of file