aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/plugins
diff options
context:
space:
mode:
authorArthurHoaro <arthur@hoa.ro>2016-05-29 14:41:30 +0200
committerArthurHoaro <arthur@hoa.ro>2016-06-11 09:30:56 +0200
commiteeea1c3daa87f133c57c96fa17ed26b02c392636 (patch)
tree40a54d6ab27cf30bbfccbd524f02f401551e761c /tests/plugins
parentd93d51b213bd3bda9bfa67d23c31dcce5a8b7fc0 (diff)
downloadShaarli-eeea1c3daa87f133c57c96fa17ed26b02c392636.tar.gz
Shaarli-eeea1c3daa87f133c57c96fa17ed26b02c392636.tar.zst
Shaarli-eeea1c3daa87f133c57c96fa17ed26b02c392636.zip
Use the configuration manager for wallabag and readityourself plugin
Diffstat (limited to 'tests/plugins')
-rw-r--r--tests/plugins/PluginReadityourselfTest.php6
-rw-r--r--tests/plugins/PluginWallabagTest.php5
2 files changed, 7 insertions, 4 deletions
diff --git a/tests/plugins/PluginReadityourselfTest.php b/tests/plugins/PluginReadityourselfTest.php
index 8bf17bf1..bc5da042 100644
--- a/tests/plugins/PluginReadityourselfTest.php
+++ b/tests/plugins/PluginReadityourselfTest.php
@@ -25,7 +25,8 @@ class PluginReadityourselfTest extends PHPUnit_Framework_TestCase
25 */ 25 */
26 function testReadityourselfLinklist() 26 function testReadityourselfLinklist()
27 { 27 {
28 $GLOBALS['plugins']['READITYOUSELF_URL'] = 'value'; 28 $conf = ConfigManager::getInstance();
29 $conf->set('plugins.READITYOUSELF_URL', 'value');
29 $str = 'http://randomstr.com/test'; 30 $str = 'http://randomstr.com/test';
30 $data = array( 31 $data = array(
31 'title' => $str, 32 'title' => $str,
@@ -52,7 +53,8 @@ class PluginReadityourselfTest extends PHPUnit_Framework_TestCase
52 */ 53 */
53 function testReadityourselfLinklistWithoutConfig() 54 function testReadityourselfLinklistWithoutConfig()
54 { 55 {
55 unset($GLOBALS['plugins']['READITYOUSELF_URL']); 56 $conf = ConfigManager::getInstance();
57 $conf->set('plugins.READITYOUSELF_URL', null);
56 $str = 'http://randomstr.com/test'; 58 $str = 'http://randomstr.com/test';
57 $data = array( 59 $data = array(
58 'title' => $str, 60 'title' => $str,
diff --git a/tests/plugins/PluginWallabagTest.php b/tests/plugins/PluginWallabagTest.php
index 5d3a60e0..e6f8a8b6 100644
--- a/tests/plugins/PluginWallabagTest.php
+++ b/tests/plugins/PluginWallabagTest.php
@@ -25,7 +25,8 @@ class PluginWallabagTest extends PHPUnit_Framework_TestCase
25 */ 25 */
26 function testWallabagLinklist() 26 function testWallabagLinklist()
27 { 27 {
28 $GLOBALS['plugins']['WALLABAG_URL'] = 'value'; 28 $conf = ConfigManager::getInstance();
29 $conf->set('plugins.WALLABAG_URL', 'value');
29 $str = 'http://randomstr.com/test'; 30 $str = 'http://randomstr.com/test';
30 $data = array( 31 $data = array(
31 'title' => $str, 32 'title' => $str,
@@ -45,7 +46,7 @@ class PluginWallabagTest extends PHPUnit_Framework_TestCase
45 // plugin data 46 // plugin data
46 $this->assertEquals(1, count($link['link_plugin'])); 47 $this->assertEquals(1, count($link['link_plugin']));
47 $this->assertNotFalse(strpos($link['link_plugin'][0], urlencode($str))); 48 $this->assertNotFalse(strpos($link['link_plugin'][0], urlencode($str)));
48 $this->assertNotFalse(strpos($link['link_plugin'][0], $GLOBALS['plugins']['WALLABAG_URL'])); 49 $this->assertNotFalse(strpos($link['link_plugin'][0], $conf->get('plugins.WALLABAG_URL')));
49 } 50 }
50} 51}
51 52