aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/plugins/PluginWallabagTest.php
diff options
context:
space:
mode:
authorArthurHoaro <arthur@hoa.ro>2016-06-09 20:04:32 +0200
committerArthurHoaro <arthur@hoa.ro>2016-06-11 09:30:56 +0200
commit51def0d84955c7a951bd091eb5eeb3fce9deabd4 (patch)
tree466c24f215ee4d25bdcce67100b11e2fd3b0c78b /tests/plugins/PluginWallabagTest.php
parent278d9ee2836df7d805845077f26f8cecd16f0f4f (diff)
downloadShaarli-51def0d84955c7a951bd091eb5eeb3fce9deabd4.tar.gz
Shaarli-51def0d84955c7a951bd091eb5eeb3fce9deabd4.tar.zst
Shaarli-51def0d84955c7a951bd091eb5eeb3fce9deabd4.zip
PluginManager no longer uses singleton pattern
Diffstat (limited to 'tests/plugins/PluginWallabagTest.php')
-rw-r--r--tests/plugins/PluginWallabagTest.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/plugins/PluginWallabagTest.php b/tests/plugins/PluginWallabagTest.php
index e6f8a8b6..302ee296 100644
--- a/tests/plugins/PluginWallabagTest.php
+++ b/tests/plugins/PluginWallabagTest.php
@@ -4,6 +4,8 @@
4 * PluginWallabagTest.php.php 4 * PluginWallabagTest.php.php
5 */ 5 */
6 6
7// FIXME! add an init method.
8$conf = new ConfigManager('');
7require_once 'plugins/wallabag/wallabag.php'; 9require_once 'plugins/wallabag/wallabag.php';
8 10
9/** 11/**
@@ -25,7 +27,7 @@ class PluginWallabagTest extends PHPUnit_Framework_TestCase
25 */ 27 */
26 function testWallabagLinklist() 28 function testWallabagLinklist()
27 { 29 {
28 $conf = ConfigManager::getInstance(); 30 $conf = new ConfigManager('');
29 $conf->set('plugins.WALLABAG_URL', 'value'); 31 $conf->set('plugins.WALLABAG_URL', 'value');
30 $str = 'http://randomstr.com/test'; 32 $str = 'http://randomstr.com/test';
31 $data = array( 33 $data = array(
@@ -37,7 +39,7 @@ class PluginWallabagTest extends PHPUnit_Framework_TestCase
37 ) 39 )
38 ); 40 );
39 41
40 $data = hook_wallabag_render_linklist($data); 42 $data = hook_wallabag_render_linklist($data, $conf);
41 $link = $data['links'][0]; 43 $link = $data['links'][0];
42 // data shouldn't be altered 44 // data shouldn't be altered
43 $this->assertEquals($str, $data['title']); 45 $this->assertEquals($str, $data['title']);
@@ -49,4 +51,3 @@ class PluginWallabagTest extends PHPUnit_Framework_TestCase
49 $this->assertNotFalse(strpos($link['link_plugin'][0], $conf->get('plugins.WALLABAG_URL'))); 51 $this->assertNotFalse(strpos($link['link_plugin'][0], $conf->get('plugins.WALLABAG_URL')));
50 } 52 }
51} 53}
52