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 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tests/plugins/PluginAddlinkTest.php') 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); -- cgit v1.2.3 From 9fbc42294e7667c5ef19cafa0d1fcfbc1c0f36a9 Mon Sep 17 00:00:00 2001 From: ArthurHoaro Date: Sun, 26 Jul 2020 14:43:10 +0200 Subject: New basePath: fix officiel plugin paths and vintage template --- tests/plugins/PluginAddlinkTest.php | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tests/plugins/PluginAddlinkTest.php') diff --git a/tests/plugins/PluginAddlinkTest.php b/tests/plugins/PluginAddlinkTest.php index 4018c1a8..aa5c6988 100644 --- a/tests/plugins/PluginAddlinkTest.php +++ b/tests/plugins/PluginAddlinkTest.php @@ -28,6 +28,7 @@ class PluginAddlinkTest extends \PHPUnit\Framework\TestCase $data = array($str => $str); $data['_PAGE_'] = TemplatePage::LINKLIST; $data['_LOGGEDIN_'] = true; + $data['_BASE_PATH_'] = '/subfolder'; $data = hook_addlink_toolbar_render_header($data); $this->assertEquals($str, $data[$str]); @@ -36,6 +37,8 @@ class PluginAddlinkTest extends \PHPUnit\Framework\TestCase $data = array($str => $str); $data['_PAGE_'] = $str; $data['_LOGGEDIN_'] = true; + $data['_BASE_PATH_'] = '/subfolder'; + $data = hook_addlink_toolbar_render_header($data); $this->assertEquals($str, $data[$str]); $this->assertArrayNotHasKey('fields_toolbar', $data); @@ -50,6 +53,7 @@ class PluginAddlinkTest extends \PHPUnit\Framework\TestCase $data = array($str => $str); $data['_PAGE_'] = TemplatePage::LINKLIST; $data['_LOGGEDIN_'] = false; + $data['_BASE_PATH_'] = '/subfolder'; $data = hook_addlink_toolbar_render_header($data); $this->assertEquals($str, $data[$str]); -- cgit v1.2.3