aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/plugins/PluginWallabagTest.php
diff options
context:
space:
mode:
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