From 1a8ac737e52cb25a5c346232ee398f5908cee7d7 Mon Sep 17 00:00:00 2001 From: ArthurHoaro Date: Mon, 6 Jul 2020 08:04:35 +0200 Subject: Process main page (linklist) through Slim controller Including a bunch of improvements on the container, and helper used across new controllers. --- tests/plugins/PluginAddlinkTest.php | 6 +++--- tests/plugins/PluginPlayvideosTest.php | 6 +++--- tests/plugins/PluginPubsubhubbubTest.php | 6 +++--- tests/plugins/PluginQrcodeTest.php | 4 ++-- 4 files changed, 11 insertions(+), 11 deletions(-) (limited to 'tests/plugins') diff --git a/tests/plugins/PluginAddlinkTest.php b/tests/plugins/PluginAddlinkTest.php index d052f8b9..4018c1a8 100644 --- a/tests/plugins/PluginAddlinkTest.php +++ b/tests/plugins/PluginAddlinkTest.php @@ -2,7 +2,7 @@ namespace Shaarli\Plugin\Addlink; use Shaarli\Plugin\PluginManager; -use Shaarli\Router; +use Shaarli\Render\TemplatePage; require_once 'plugins/addlink_toolbar/addlink_toolbar.php'; @@ -26,7 +26,7 @@ class PluginAddlinkTest extends \PHPUnit\Framework\TestCase { $str = 'stuff'; $data = array($str => $str); - $data['_PAGE_'] = Router::$PAGE_LINKLIST; + $data['_PAGE_'] = TemplatePage::LINKLIST; $data['_LOGGEDIN_'] = true; $data = hook_addlink_toolbar_render_header($data); @@ -48,7 +48,7 @@ class PluginAddlinkTest extends \PHPUnit\Framework\TestCase { $str = 'stuff'; $data = array($str => $str); - $data['_PAGE_'] = Router::$PAGE_LINKLIST; + $data['_PAGE_'] = TemplatePage::LINKLIST; $data['_LOGGEDIN_'] = false; $data = hook_addlink_toolbar_render_header($data); diff --git a/tests/plugins/PluginPlayvideosTest.php b/tests/plugins/PluginPlayvideosTest.php index 51472617..b7b6ce53 100644 --- a/tests/plugins/PluginPlayvideosTest.php +++ b/tests/plugins/PluginPlayvideosTest.php @@ -6,7 +6,7 @@ namespace Shaarli\Plugin\Playvideos; */ use Shaarli\Plugin\PluginManager; -use Shaarli\Router; +use Shaarli\Render\TemplatePage; require_once 'plugins/playvideos/playvideos.php'; @@ -31,7 +31,7 @@ class PluginPlayvideosTest extends \PHPUnit\Framework\TestCase { $str = 'stuff'; $data = array($str => $str); - $data['_PAGE_'] = Router::$PAGE_LINKLIST; + $data['_PAGE_'] = TemplatePage::LINKLIST; $data = hook_playvideos_render_header($data); $this->assertEquals($str, $data[$str]); @@ -50,7 +50,7 @@ class PluginPlayvideosTest extends \PHPUnit\Framework\TestCase { $str = 'stuff'; $data = array($str => $str); - $data['_PAGE_'] = Router::$PAGE_LINKLIST; + $data['_PAGE_'] = TemplatePage::LINKLIST; $data = hook_playvideos_render_footer($data); $this->assertEquals($str, $data[$str]); diff --git a/tests/plugins/PluginPubsubhubbubTest.php b/tests/plugins/PluginPubsubhubbubTest.php index a7bd8fc9..e66f484e 100644 --- a/tests/plugins/PluginPubsubhubbubTest.php +++ b/tests/plugins/PluginPubsubhubbubTest.php @@ -3,7 +3,7 @@ namespace Shaarli\Plugin\Pubsubhubbub; use Shaarli\Config\ConfigManager; use Shaarli\Plugin\PluginManager; -use Shaarli\Router; +use Shaarli\Render\TemplatePage; require_once 'plugins/pubsubhubbub/pubsubhubbub.php'; @@ -34,7 +34,7 @@ class PluginPubsubhubbubTest extends \PHPUnit\Framework\TestCase $hub = 'http://domain.hub'; $conf = new ConfigManager(self::$configFile); $conf->set('plugins.PUBSUBHUB_URL', $hub); - $data['_PAGE_'] = Router::$PAGE_FEED_RSS; + $data['_PAGE_'] = TemplatePage::FEED_RSS; $data = hook_pubsubhubbub_render_feed($data, $conf); $expected = ''; @@ -49,7 +49,7 @@ class PluginPubsubhubbubTest extends \PHPUnit\Framework\TestCase $hub = 'http://domain.hub'; $conf = new ConfigManager(self::$configFile); $conf->set('plugins.PUBSUBHUB_URL', $hub); - $data['_PAGE_'] = Router::$PAGE_FEED_ATOM; + $data['_PAGE_'] = TemplatePage::FEED_ATOM; $data = hook_pubsubhubbub_render_feed($data, $conf); $expected = ''; diff --git a/tests/plugins/PluginQrcodeTest.php b/tests/plugins/PluginQrcodeTest.php index 0c61e14a..c9f8c733 100644 --- a/tests/plugins/PluginQrcodeTest.php +++ b/tests/plugins/PluginQrcodeTest.php @@ -6,7 +6,7 @@ namespace Shaarli\Plugin\Qrcode; */ use Shaarli\Plugin\PluginManager; -use Shaarli\Router; +use Shaarli\Render\TemplatePage; require_once 'plugins/qrcode/qrcode.php'; @@ -57,7 +57,7 @@ class PluginQrcodeTest extends \PHPUnit\Framework\TestCase { $str = 'stuff'; $data = array($str => $str); - $data['_PAGE_'] = Router::$PAGE_LINKLIST; + $data['_PAGE_'] = TemplatePage::LINKLIST; $data = hook_qrcode_render_footer($data); $this->assertEquals($str, $data[$str]); -- cgit v1.2.3