From dea0ba28f950867532eae572e7bcda49e81bbcf0 Mon Sep 17 00:00:00 2001 From: ArthurHoaro Date: Wed, 18 Nov 2015 17:40:42 +0100 Subject: Fixes #378 - Plugin administration UI. --- tests/PluginManagerTest.php | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'tests/PluginManagerTest.php') diff --git a/tests/PluginManagerTest.php b/tests/PluginManagerTest.php index df2614b5..348082c7 100644 --- a/tests/PluginManagerTest.php +++ b/tests/PluginManagerTest.php @@ -63,4 +63,23 @@ class PluginManagerTest extends PHPUnit_Framework_TestCase $pluginManager->load(array('nope', 'renope')); } + + /** + * Test plugin metadata loading. + */ + public function testGetPluginsMeta() + { + $pluginManager = PluginManager::getInstance(); + + PluginManager::$PLUGINS_PATH = self::$pluginPath; + $pluginManager->load(array(self::$pluginName)); + + $expectedParameters = array( + 'pop' => '', + 'hip' => '', + ); + $meta = $pluginManager->getPluginsMeta(); + $this->assertEquals('test plugin', $meta[self::$pluginName]['description']); + $this->assertEquals($expectedParameters, $meta[self::$pluginName]['parameters']); + } } \ No newline at end of file -- cgit v1.2.3