From db90dfcbbc406b50381f17a72f24095fee91bb09 Mon Sep 17 00:00:00 2001 From: ArthurHoaro Date: Tue, 2 Aug 2016 11:55:49 +0200 Subject: Move PubSubHubbub code as a default plugin --- tests/plugins/PluginPubsubhubbubTest.php | 54 ++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 tests/plugins/PluginPubsubhubbubTest.php (limited to 'tests/plugins') diff --git a/tests/plugins/PluginPubsubhubbubTest.php b/tests/plugins/PluginPubsubhubbubTest.php new file mode 100644 index 00000000..24dd7a11 --- /dev/null +++ b/tests/plugins/PluginPubsubhubbubTest.php @@ -0,0 +1,54 @@ +set('plugins.PUBSUBHUB_URL', $hub); + $data['_PAGE_'] = Router::$PAGE_FEED_RSS; + + $data = hook_pubsubhubbub_render_feed($data, $conf); + $expected = ''; + $this->assertEquals($expected, $data['feed_plugins_header'][0]); + } + + /** + * Test render_feed hook with an ATOM feed. + */ + function testPubSubAtomRenderFeed() + { + $hub = 'http://domain.hub'; + $conf = new ConfigManager(self::$configFile); + $conf->set('plugins.PUBSUBHUB_URL', $hub); + $data['_PAGE_'] = Router::$PAGE_FEED_ATOM; + + $data = hook_pubsubhubbub_render_feed($data, $conf); + $expected = ''; + $this->assertEquals($expected, $data['feed_plugins_header'][0]); + } +} -- cgit v1.2.3