4 * PluginWallabagTest.php.php
7 require_once 'plugins/wallabag/wallabag.php';
10 * Class PluginWallabagTest
11 * Unit test for the Wallabag plugin
13 class PluginWallabagTest
extends PHPUnit_Framework_TestCase
20 PluginManager
::$PLUGINS_PATH = 'plugins';
24 * Test render_linklist hook.
26 function testWallabagLinklist()
28 $GLOBALS['plugins']['WALLABAG_URL'] = 'value';
29 $str = 'http://randomstr.com/test';
39 $data = hook_wallabag_render_linklist($data);
40 $link = $data['links'][0];
41 // data shouldn't be altered
42 $this->assertEquals($str, $data['title']);
43 $this->assertEquals($str, $link['url']);
46 $this->assertEquals(1, count($link['link_plugin']));
47 $this->assertNotFalse(strpos($link['link_plugin'][0], $str));