namespacing: add plugin tests to \Shaarli\Plugin\[...]

Signed-off-by: VirtualTam <virtualtam@flibidi.net>
This commit is contained in:
VirtualTam 2018-12-04 23:17:23 +01:00
parent e185038834
commit 9585441734
12 changed files with 26 additions and 18 deletions

View file

@ -48,6 +48,7 @@
"Shaarli\\Netscape\\": "application/netscape", "Shaarli\\Netscape\\": "application/netscape",
"Shaarli\\Plugin\\": "application/plugin", "Shaarli\\Plugin\\": "application/plugin",
"Shaarli\\Plugin\\Exception\\": "application/plugin/exception", "Shaarli\\Plugin\\Exception\\": "application/plugin/exception",
"Shaarli\\Plugin\\Wallabag\\": "plugins/wallabag",
"Shaarli\\Render\\": "application/render", "Shaarli\\Render\\": "application/render",
"Shaarli\\Security\\": "application/security", "Shaarli\\Security\\": "application/security",
"Shaarli\\Updater\\": "application/updater", "Shaarli\\Updater\\": "application/updater",

View file

@ -1,4 +1,5 @@
<?php <?php
namespace Shaarli\Plugin\Wallabag;
/** /**
* Class WallabagInstance. * Class WallabagInstance.

View file

@ -1,12 +1,11 @@
<?php <?php
/** /**
* Plugin Wallabag. * Wallabag plugin
*/ */
require_once 'WallabagInstance.php';
use Shaarli\Config\ConfigManager; use Shaarli\Config\ConfigManager;
use Shaarli\Plugin\PluginManager; use Shaarli\Plugin\PluginManager;
use Shaarli\Plugin\Wallabag\WallabagInstance;
/** /**
* Init function, return an error if the server is not set. * Init function, return an error if the server is not set.

View file

@ -1,4 +1,5 @@
<?php <?php
namespace Shaarli\Plugin\Addlink;
use Shaarli\Plugin\PluginManager; use Shaarli\Plugin\PluginManager;
use Shaarli\Router; use Shaarli\Router;

View file

@ -1,4 +1,5 @@
<?php <?php
namespace Shaarli\Plugin\Archiveorg;
/** /**
* PluginArchiveorgTest.php * PluginArchiveorgTest.php
@ -12,7 +13,7 @@
* Class PluginArchiveorgTest * Class PluginArchiveorgTest
* Unit test for the archiveorg plugin * Unit test for the archiveorg plugin
*/ */
class PluginArchiveorgTest extends PHPUnit_Framework_TestCase class PluginArchiveorgTest extends \PHPUnit\Framework\TestCase
{ {
/** /**
* Reset plugin path * Reset plugin path

View file

@ -1,5 +1,7 @@
<?php <?php
namespace Shaarli\Plugin\Isso;
use DateTime;
use Shaarli\Bookmark\LinkDB; use Shaarli\Bookmark\LinkDB;
use Shaarli\Config\ConfigManager; use Shaarli\Config\ConfigManager;
use Shaarli\Plugin\PluginManager; use Shaarli\Plugin\PluginManager;
@ -11,7 +13,7 @@
* *
* Test the Isso plugin (comment system). * Test the Isso plugin (comment system).
*/ */
class PluginIssoTest extends PHPUnit_Framework_TestCase class PluginIssoTest extends \PHPUnit\Framework\TestCase
{ {
/** /**
* Reset plugin path * Reset plugin path

View file

@ -1,4 +1,6 @@
<?php <?php
namespace Shaarli\Plugin\Markdown;
use Shaarli\Config\ConfigManager; use Shaarli\Config\ConfigManager;
use Shaarli\Plugin\PluginManager; use Shaarli\Plugin\PluginManager;
@ -14,7 +16,7 @@
* Class PluginMarkdownTest * Class PluginMarkdownTest
* Unit test for the Markdown plugin * Unit test for the Markdown plugin
*/ */
class PluginMarkdownTest extends PHPUnit_Framework_TestCase class PluginMarkdownTest extends \PHPUnit\Framework\TestCase
{ {
/** /**
* @var ConfigManager instance. * @var ConfigManager instance.

View file

@ -1,4 +1,5 @@
<?php <?php
namespace Shaarli\Plugin\Playvideos;
/** /**
* PluginPlayvideosTest.php * PluginPlayvideosTest.php
@ -8,13 +9,12 @@
use Shaarli\Router; use Shaarli\Router;
require_once 'plugins/playvideos/playvideos.php'; require_once 'plugins/playvideos/playvideos.php';
require_once 'application/Router.php';
/** /**
* Class PluginPlayvideosTest * Class PluginPlayvideosTest
* Unit test for the PlayVideos plugin * Unit test for the PlayVideos plugin
*/ */
class PluginPlayvideosTest extends PHPUnit_Framework_TestCase class PluginPlayvideosTest extends \PHPUnit\Framework\TestCase
{ {
/** /**
* Reset plugin path * Reset plugin path

View file

@ -1,16 +1,17 @@
<?php <?php
namespace Shaarli\Plugin\Pubsubhubbub;
use Shaarli\Config\ConfigManager; use Shaarli\Config\ConfigManager;
use Shaarli\Plugin\PluginManager; use Shaarli\Plugin\PluginManager;
use Shaarli\Router; use Shaarli\Router;
require_once 'plugins/pubsubhubbub/pubsubhubbub.php'; require_once 'plugins/pubsubhubbub/pubsubhubbub.php';
require_once 'application/Router.php';
/** /**
* Class PluginPubsubhubbubTest * Class PluginPubsubhubbubTest
* Unit test for the pubsubhubbub plugin * 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). * @var string Config file path (without extension).

View file

@ -1,4 +1,6 @@
<?php <?php
namespace Shaarli\Plugin\Qrcode;
/** /**
* PluginQrcodeTest.php * PluginQrcodeTest.php
*/ */
@ -7,13 +9,12 @@
use Shaarli\Router; use Shaarli\Router;
require_once 'plugins/qrcode/qrcode.php'; require_once 'plugins/qrcode/qrcode.php';
require_once 'application/Router.php';
/** /**
* Class PluginQrcodeTest * Class PluginQrcodeTest
* Unit test for the QR-Code plugin * Unit test for the QR-Code plugin
*/ */
class PluginQrcodeTest extends PHPUnit_Framework_TestCase class PluginQrcodeTest extends \PHPUnit\Framework\TestCase
{ {
/** /**
* Reset plugin path * Reset plugin path

View file

@ -1,11 +1,9 @@
<?php <?php
namespace Shaarli\Plugin\Wallabag;
use Shaarli\Config\ConfigManager; use Shaarli\Config\ConfigManager;
use Shaarli\Plugin\PluginManager; use Shaarli\Plugin\PluginManager;
/**
* PluginWallabagTest.php.php
*/
require_once 'plugins/wallabag/wallabag.php'; require_once 'plugins/wallabag/wallabag.php';
/** /**

View file

@ -1,11 +1,12 @@
<?php <?php
namespace Shaarli\Plugin\Wallabag;
require_once 'plugins/wallabag/WallabagInstance.php'; use Shaarli\Plugin\Wallabag\WallabagInstance;
/** /**
* Class WallabagInstanceTest * Class WallabagInstanceTest
*/ */
class WallabagInstanceTest extends PHPUnit_Framework_TestCase class WallabagInstanceTest extends \PHPUnit\Framework\TestCase
{ {
/** /**
* @var string wallabag url. * @var string wallabag url.