]> git.immae.eu Git - github/shaarli/Shaarli.git/commitdiff
namespacing: add plugin tests to \Shaarli\Plugin\[...]
authorVirtualTam <virtualtam@flibidi.net>
Tue, 4 Dec 2018 22:17:23 +0000 (23:17 +0100)
committerVirtualTam <virtualtam@flibidi.net>
Sat, 12 Jan 2019 22:11:19 +0000 (23:11 +0100)
Signed-off-by: VirtualTam <virtualtam@flibidi.net>
12 files changed:
composer.json
plugins/wallabag/WallabagInstance.php
plugins/wallabag/wallabag.php
tests/plugins/PluginAddlinkTest.php
tests/plugins/PluginArchiveorgTest.php
tests/plugins/PluginIssoTest.php
tests/plugins/PluginMarkdownTest.php
tests/plugins/PluginPlayvideosTest.php
tests/plugins/PluginPubsubhubbubTest.php
tests/plugins/PluginQrcodeTest.php
tests/plugins/PluginWallabagTest.php
tests/plugins/WallabagInstanceTest.php

index a2df466a54fe0ab3abe6c2facd51ff02a5cae073..8a98cfb6aa05155d2b3234a2599bc93bb456a4ce 100644 (file)
@@ -48,6 +48,7 @@
             "Shaarli\\Netscape\\": "application/netscape",
             "Shaarli\\Plugin\\": "application/plugin",
             "Shaarli\\Plugin\\Exception\\": "application/plugin/exception",
+            "Shaarli\\Plugin\\Wallabag\\": "plugins/wallabag",
             "Shaarli\\Render\\": "application/render",
             "Shaarli\\Security\\": "application/security",
             "Shaarli\\Updater\\": "application/updater",
index eb8ab618f14f72a768b5851d4e804f1b5f0c2974..f4a0a92bdb8148a180fe169cfc2d2316d2cf1fd3 100644 (file)
@@ -1,4 +1,5 @@
 <?php
+namespace Shaarli\Plugin\Wallabag;
 
 /**
  * Class WallabagInstance.
index 5ba1611d539b1e117e8817f690718cdf007655da..bc35df08dcde122f0ca11e8fad30dc17e6f16baf 100644 (file)
@@ -1,12 +1,11 @@
 <?php
-
 /**
- * Plugin Wallabag.
+ * Wallabag plugin
  */
 
-require_once 'WallabagInstance.php';
 use Shaarli\Config\ConfigManager;
 use Shaarli\Plugin\PluginManager;
+use Shaarli\Plugin\Wallabag\WallabagInstance;
 
 /**
  * Init function, return an error if the server is not set.
index e0a0107d5a485fcf5e5c36e88eb5a318095e40d8..d052f8b9f24766911d4c295a4015b24456959f07 100644 (file)
@@ -1,4 +1,5 @@
 <?php
+namespace Shaarli\Plugin\Addlink;
 
 use Shaarli\Plugin\PluginManager;
 use Shaarli\Router;
index d06bfa59eec45bb32f2cd13b80a9414b14d709f4..510288bbadc2e31557142896d89034bf10a40148 100644 (file)
@@ -1,4 +1,5 @@
 <?php
+namespace Shaarli\Plugin\Archiveorg;
 
 /**
  * PluginArchiveorgTest.php
@@ -12,7 +13,7 @@ require_once 'plugins/archiveorg/archiveorg.php';
  * Class PluginArchiveorgTest
  * Unit test for the archiveorg plugin
  */
-class PluginArchiveorgTest extends PHPUnit_Framework_TestCase
+class PluginArchiveorgTest extends \PHPUnit\Framework\TestCase
 {
     /**
      * Reset plugin path
index 7aee21974066d74bf51d290fd88341c4992ba9f0..bdfab439cd60d0a42b22193dd1f4b7ddd60d0076 100644 (file)
@@ -1,5 +1,7 @@
 <?php
+namespace Shaarli\Plugin\Isso;
 
+use DateTime;
 use Shaarli\Bookmark\LinkDB;
 use Shaarli\Config\ConfigManager;
 use Shaarli\Plugin\PluginManager;
@@ -11,7 +13,7 @@ require_once 'plugins/isso/isso.php';
  *
  * Test the Isso plugin (comment system).
  */
-class PluginIssoTest extends PHPUnit_Framework_TestCase
+class PluginIssoTest extends \PHPUnit\Framework\TestCase
 {
     /**
      * Reset plugin path
index 90a19e7b3862212bab7fea8f23e79139c850b5b7..5e7c02b0c8f5b95407733d73cf01f95b26ccf3e8 100644 (file)
@@ -1,4 +1,6 @@
 <?php
+namespace Shaarli\Plugin\Markdown;
+
 use Shaarli\Config\ConfigManager;
 use Shaarli\Plugin\PluginManager;
 
@@ -14,7 +16,7 @@ require_once 'plugins/markdown/markdown.php';
  * Class PluginMarkdownTest
  * Unit test for the Markdown plugin
  */
-class PluginMarkdownTest extends PHPUnit_Framework_TestCase
+class PluginMarkdownTest extends \PHPUnit\Framework\TestCase
 {
     /**
      * @var ConfigManager instance.
index aa3ad14341809101a5f885506cc13458362bc057..51472617ad47cf21cd5fbc418ca2fd5d0982652c 100644 (file)
@@ -1,4 +1,5 @@
 <?php
+namespace Shaarli\Plugin\Playvideos;
 
 /**
  * PluginPlayvideosTest.php
@@ -8,13 +9,12 @@ use Shaarli\Plugin\PluginManager;
 use Shaarli\Router;
 
 require_once 'plugins/playvideos/playvideos.php';
-require_once 'application/Router.php';
 
 /**
  * Class PluginPlayvideosTest
  * Unit test for the PlayVideos plugin
  */
-class PluginPlayvideosTest extends PHPUnit_Framework_TestCase
+class PluginPlayvideosTest extends \PHPUnit\Framework\TestCase
 {
     /**
      * Reset plugin path
index 4680513eba0cef15f50d7075af937295938c02e9..a7bd8fc93d79980633fd7edc71a66eb248df0b3e 100644 (file)
@@ -1,16 +1,17 @@
 <?php
+namespace Shaarli\Plugin\Pubsubhubbub;
+
 use Shaarli\Config\ConfigManager;
 use Shaarli\Plugin\PluginManager;
 use Shaarli\Router;
 
 require_once 'plugins/pubsubhubbub/pubsubhubbub.php';
-require_once 'application/Router.php';
 
 /**
  * Class PluginPubsubhubbubTest
  * Unit test for the pubsubhubbub plugin
  */
-class PluginPubsubhubbubTest extends PHPUnit_Framework_TestCase
+class PluginPubsubhubbubTest extends \PHPUnit\Framework\TestCase
 {
     /**
      * @var string Config file path (without extension).
index 325e3109c8c63b012fb4b573792cfebe95f7a0f2..0c61e14a75bc841f1be4d5362bcb4b55c8b4662d 100644 (file)
@@ -1,4 +1,6 @@
 <?php
+namespace Shaarli\Plugin\Qrcode;
+
 /**
  * PluginQrcodeTest.php
  */
@@ -7,13 +9,12 @@ use Shaarli\Plugin\PluginManager;
 use Shaarli\Router;
 
 require_once 'plugins/qrcode/qrcode.php';
-require_once 'application/Router.php';
 
 /**
  * Class PluginQrcodeTest
  * Unit test for the QR-Code plugin
  */
-class PluginQrcodeTest extends PHPUnit_Framework_TestCase
+class PluginQrcodeTest extends \PHPUnit\Framework\TestCase
 {
     /**
      * Reset plugin path
index 4e445efb225e148caec09345967cc3f4983ae78f..797519210c63c5827da633d870e90de1b152d6c3 100644 (file)
@@ -1,11 +1,9 @@
 <?php
+namespace Shaarli\Plugin\Wallabag;
+
 use Shaarli\Config\ConfigManager;
 use Shaarli\Plugin\PluginManager;
 
-/**
- * PluginWallabagTest.php.php
- */
-
 require_once 'plugins/wallabag/wallabag.php';
 
 /**
index 2c46687100c13495408e80ac68dc31523283fd78..bcc01604e12aa4a9e4af8c20298b3c4d808e8819 100644 (file)
@@ -1,11 +1,12 @@
 <?php
+namespace Shaarli\Plugin\Wallabag;
 
-require_once 'plugins/wallabag/WallabagInstance.php';
+use Shaarli\Plugin\Wallabag\WallabagInstance;
 
 /**
  * Class WallabagInstanceTest
  */
-class WallabagInstanceTest extends PHPUnit_Framework_TestCase
+class WallabagInstanceTest extends \PHPUnit\Framework\TestCase
 {
     /**
      * @var string wallabag url.