X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=tests%2Fplugins%2FPluginWallabagTest.php;h=2c268cbd1b714b3b9aa1c29891bbf40e8592b24a;hb=baec9c402873a716497b591b9756bf5b2c46ed9b;hp=302ee296f023d4f8a97db2270cb08e79d6650e82;hpb=b3c039b02f9608802d0ba2cf5b5742caa3b9d430;p=github%2Fshaarli%2FShaarli.git diff --git a/tests/plugins/PluginWallabagTest.php b/tests/plugins/PluginWallabagTest.php index 302ee296..2c268cbd 100644 --- a/tests/plugins/PluginWallabagTest.php +++ b/tests/plugins/PluginWallabagTest.php @@ -4,8 +4,6 @@ * PluginWallabagTest.php.php */ -// FIXME! add an init method. -$conf = new ConfigManager(''); require_once 'plugins/wallabag/wallabag.php'; /** @@ -22,6 +20,27 @@ class PluginWallabagTest extends PHPUnit_Framework_TestCase PluginManager::$PLUGINS_PATH = 'plugins'; } + /** + * Test wallabag init without errors. + */ + function testWallabagInitNoError() + { + $conf = new ConfigManager(''); + $conf->set('plugins.WALLABAG_URL', 'value'); + $errors = wallabag_init($conf); + $this->assertEmpty($errors); + } + + /** + * Test wallabag init with errors. + */ + function testWallabagInitError() + { + $conf = new ConfigManager(''); + $errors = wallabag_init($conf); + $this->assertNotEmpty($errors); + } + /** * Test render_linklist hook. */