aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/plugins
diff options
context:
space:
mode:
authorArthurHoaro <arthur@hoa.ro>2017-01-15 17:50:16 +0100
committerArthurHoaro <arthur@hoa.ro>2017-01-15 17:50:16 +0100
commit053673cb71a45a38a2eb517c4e630656a5626327 (patch)
treec5cdae90eeae5c28c69f50aa5acc481a0e9b3cd0 /tests/plugins
parent9977c418d6d0de9e22e4ec276e7d476e184b5d01 (diff)
downloadShaarli-053673cb71a45a38a2eb517c4e630656a5626327.tar.gz
Shaarli-053673cb71a45a38a2eb517c4e630656a5626327.tar.zst
Shaarli-053673cb71a45a38a2eb517c4e630656a5626327.zip
Remove CSS call for addlink toolbar plugin
Fixes #724
Diffstat (limited to 'tests/plugins')
-rw-r--r--tests/plugins/PluginAddlinkTest.php40
1 files changed, 0 insertions, 40 deletions
diff --git a/tests/plugins/PluginAddlinkTest.php b/tests/plugins/PluginAddlinkTest.php
index b77fe12a..b6239e7f 100644
--- a/tests/plugins/PluginAddlinkTest.php
+++ b/tests/plugins/PluginAddlinkTest.php
@@ -57,44 +57,4 @@ class PluginAddlinkTest extends PHPUnit_Framework_TestCase
57 $this->assertEquals($str, $data[$str]); 57 $this->assertEquals($str, $data[$str]);
58 $this->assertArrayNotHasKey('fields_toolbar', $data); 58 $this->assertArrayNotHasKey('fields_toolbar', $data);
59 } 59 }
60
61 /**
62 * Test render_includes hook while logged in.
63 */
64 public function testAddlinkIncludesLoggedIn()
65 {
66 $str = 'stuff';
67 $data = array($str => $str);
68 $data['_PAGE_'] = Router::$PAGE_LINKLIST;
69 $data['_LOGGEDIN_'] = true;
70
71 $data = hook_addlink_toolbar_render_includes($data);
72 $this->assertEquals($str, $data[$str]);
73 $this->assertEquals(1, count($data['css_files']));
74
75 $str = 'stuff';
76 $data = array($str => $str);
77 $data['_PAGE_'] = $str;
78 $data['_LOGGEDIN_'] = true;
79
80 $data = hook_addlink_toolbar_render_includes($data);
81 $this->assertEquals($str, $data[$str]);
82 $this->assertArrayNotHasKey('css_files', $data);
83 }
84
85 /**
86 * Test render_includes hook.
87 * Should not affect css files while logged out.
88 */
89 public function testAddlinkIncludesLoggedOut()
90 {
91 $str = 'stuff';
92 $data = array($str => $str);
93 $data['_PAGE_'] = Router::$PAGE_LINKLIST;
94 $data['_LOGGEDIN_'] = false;
95
96 $data = hook_addlink_toolbar_render_includes($data);
97 $this->assertEquals($str, $data[$str]);
98 $this->assertArrayNotHasKey('css_files', $data);
99 }
100} 60}