Skip to content
Snippets Groups Projects
Commit 17d818b2 authored by Alex Barth's avatar Alex Barth
Browse files

Add test modules.

parent 2e1f30df
No related branches found
No related tags found
No related merge requests found
; $Id$
name = "Feeds tests"
description = "Test module for Feeds."
package = Testing
version = VERSION
core = 6.x
; hidden = TRUE
\ No newline at end of file
<?php
// $Id$
/**
* @file
* Test module for Feeds.
*/
/**
* Implementation of hook_menu().
*/
function feeds_test_menu() {
$items = array();
$items['opml-test-feed'] = array(
'page callback' => 'feeds_test_opml_feed',
'access arguments' => array('access content'),
);
return $items;
}
/**
* Render an OPML feed pointing to local feeds.
*/
function feeds_test_opml_feed() {
$path = dirname($GLOBALS['_SERVER']['SCRIPT_FILENAME']) .'/'. drupal_get_path('module', 'feeds') .'/tests/feeds/';
drupal_set_header('Content-Type: application/rss+xml; charset=utf-8');
$output =
'<?xml version="1.0" encoding="utf-8"?>
<opml version="1.1">
<head>
<title>Feeds test OPML</title>
<dateCreated>Fri, 16 Oct 2009 02:53:17 GMT</dateCreated>
<ownerName></ownerName>
</head>
<body>
<outline text="Feeds test group" >
<outline title="Development Seed - Technological Solutions for Progressive Organizations" text="" xmlUrl="'. $path .'developmentseed.rss2" type="rss" />
<outline title="Magyar Nemzet Online - Hrek" text="" xmlUrl="'. $path .'feed_without_guid.rss2" type="rss" />
<outline title="Drupal planet" text="" type="rss" xmlUrl="'. $path .'drupalplanet.rss2" />
</outline>
</body>
</opml>';
print $output;
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment