X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=tests%2Fplugins%2FPluginWallabagTest.php;h=2c268cbd1b714b3b9aa1c29891bbf40e8592b24a;hb=7fde6de1212323418401c15efba06026c704ca87;hp=302ee296f023d4f8a97db2270cb08e79d6650e82;hpb=f63632a6fb84594b8aeacb387a5cd17b4a841d2c;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. */