Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
feeds
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
drupal.org
feeds
Commits
17d818b2
Commit
17d818b2
authored
15 years ago
by
Alex Barth
Browse files
Options
Downloads
Patches
Plain Diff
Add test modules.
parent
2e1f30df
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
tests/feeds_test.info
+7
-0
7 additions, 0 deletions
tests/feeds_test.info
tests/feeds_test.module
+45
-0
45 additions, 0 deletions
tests/feeds_test.module
with
52 additions
and
0 deletions
tests/feeds_test.info
0 → 100644
+
7
−
0
View file @
17d818b2
; $Id$
name = "Feeds tests"
description = "Test module for Feeds."
package = Testing
version = VERSION
core = 6.x
; hidden = TRUE
\ No newline at end of file
This diff is collapsed.
Click to expand it.
tests/feeds_test.module
0 → 100644
+
45
−
0
View file @
17d818b2
<?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
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment