]> git.immae.eu Git - github/shaarli/Shaarli.git/blobdiff - tests/PluginManagerTest.php
Run Unit Tests against PHP 7.4
[github/shaarli/Shaarli.git] / tests / PluginManagerTest.php
index 61efce68310ba1c791063ecebb7544bf57acf57d..195d959c2fc4c3ab3e30d4a07b9b1ce57105a1f1 100644 (file)
@@ -1,15 +1,12 @@
 <?php
+namespace Shaarli\Plugin;
 
-/**
- * Plugin Manager tests
- */
-
-require_once 'application/PluginManager.php';
+use Shaarli\Config\ConfigManager;
 
 /**
  * Unit tests for Plugins
  */
-class PluginManagerTest extends PHPUnit_Framework_TestCase
+class PluginManagerTest extends \PHPUnit\Framework\TestCase
 {
     /**
      * Path to tests plugin.
@@ -61,13 +58,12 @@ class PluginManagerTest extends PHPUnit_Framework_TestCase
 
     /**
      * Test missing plugin loading.
-     *
-     * @return void
      */
     public function testPluginNotFound()
     {
         $this->pluginManager->load(array());
         $this->pluginManager->load(array('nope', 'renope'));
+        $this->addToAssertionCount(1);
     }
 
     /**
@@ -79,11 +75,17 @@ class PluginManagerTest extends PHPUnit_Framework_TestCase
         $this->pluginManager->load(array(self::$pluginName));
 
         $expectedParameters = array(
-            'pop' => '',
-            'hip' => '',
+            'pop' => array(
+                'value' => '',
+                'desc'  => 'pop description',
+            ),
+            'hip' => array(
+                'value' => '',
+                'desc' => '',
+            ),
         );
         $meta = $this->pluginManager->getPluginsMeta();
         $this->assertEquals('test plugin', $meta[self::$pluginName]['description']);
         $this->assertEquals($expectedParameters, $meta[self::$pluginName]['parameters']);
     }
-}
\ No newline at end of file
+}