mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-07-31 22:00:23 +02:00
tests: Use PSR-4-style namespaces (#2778)
We cannot yet switch to namespaces for RSS-Bridge itself but for tests we are not limited by BC. It does not actually do anything since PHPUnit will search for the test files without the help of the autoloader but it still makes the directory cleaner.
This commit is contained in:
64
tests/Formats/samples/expectedMrssFormat/feed.common.xml
Normal file
64
tests/Formats/samples/expectedMrssFormat/feed.common.xml
Normal file
@@ -0,0 +1,64 @@
|
||||
<?xml version="1.0"?>
|
||||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:media="http://search.yahoo.com/mrss/">
|
||||
<channel>
|
||||
<title>Sample feed with common data</title>
|
||||
<link>https://example.com/blog/</link>
|
||||
<description>Sample feed with common data</description>
|
||||
<image>
|
||||
<url>https://example.com/logo.png</url>
|
||||
<title>Sample feed with common data</title>
|
||||
<link>https://example.com/blog/</link>
|
||||
</image>
|
||||
<atom:link href="https://example.com/blog/" rel="alternate" type="text/html"/>
|
||||
<atom:link href="https://example.com/feed?type=common&items=4" rel="self" type="application/atom+xml"/>
|
||||
|
||||
<item>
|
||||
<title>Test Entry</title>
|
||||
<link>http://example.com/blog/test-entry</link>
|
||||
<guid isPermaLink="true">http://example.com/blog/test-entry</guid>
|
||||
<pubDate>Sat, 01 Dec 2018 12:00:00 +0000</pubDate>
|
||||
<description>Hello world, this is a test entry.</description>
|
||||
<category>test</category>
|
||||
<category>Hello World</category>
|
||||
<category>example</category>
|
||||
</item>
|
||||
<item>
|
||||
<title>Announcing JSON Feed</title>
|
||||
<link>https://jsonfeed.org/2017/05/17/announcing_json_feed</link>
|
||||
<guid isPermaLink="true">https://jsonfeed.org/2017/05/17/announcing_json_feed</guid>
|
||||
<pubDate>Wed, 17 May 2017 13:02:12 +0000</pubDate>
|
||||
<description><p>We — Manton Reece and Brent Simmons — have noticed that JSON has become the developers’ choice for APIs, and that developers will often go out of their way to avoid XML. JSON is simpler to read and write, and it’s less prone to bugs.</p>
|
||||
|
||||
<p>So we developed JSON Feed, a format similar to <a href="http://cyber.harvard.edu/rss/rss.html">RSS</a> and <a href="https://tools.ietf.org/html/rfc4287">Atom</a> but in JSON. It reflects the lessons learned from our years of work reading and publishing feeds.</p>
|
||||
|
||||
<p><a href="https://jsonfeed.org/version/1">See the spec</a>. It’s at version 1, which may be the only version ever needed. If future versions are needed, version 1 feeds will still be valid feeds.</p>
|
||||
|
||||
<h4>Notes</h4>
|
||||
|
||||
<p>We have a <a href="https://github.com/manton/jsonfeed-wp">WordPress plugin</a> and, coming soon, a JSON Feed Parser for Swift. As more code is written, by us and others, we’ll update the <a href="https://jsonfeed.org/code">code</a> page.</p>
|
||||
|
||||
<p>See <a href="https://jsonfeed.org/mappingrssandatom">Mapping RSS and Atom to JSON Feed</a> for more on the similarities between the formats.</p>
|
||||
|
||||
<p>This website — the Markdown files and supporting resources — <a href="https://github.com/brentsimmons/JSONFeed">is up on GitHub</a>, and you’re welcome to comment there.</p>
|
||||
|
||||
<p>This website is also a blog, and you can subscribe to the <a href="https://jsonfeed.org/xml/rss.xml">RSS feed</a> or the <a href="https://jsonfeed.org/feed.json">JSON feed</a> (if your reader supports it).</p>
|
||||
|
||||
<p>We worked with a number of people on this over the course of several months. We list them, and thank them, at the bottom of the <a href="https://jsonfeed.org/version/1">spec</a>. But — most importantly — <a href="http://furbo.org/">Craig Hockenberry</a> spent a little time making it look pretty. :)</p></description>
|
||||
</item>
|
||||
<item>
|
||||
<title>Atom draft-07 snapshot</title>
|
||||
<link>http://example.org/2005/04/02/atom</link>
|
||||
<guid isPermaLink="false">dd6b6c920d3b340ab9e07faf6682f2a7c4f70134</guid>
|
||||
<pubDate>Sun, 31 Jul 2005 12:29:29 +0000</pubDate>
|
||||
<description><p><i>[Update: The Atom draft is finished.]</i></p></description>
|
||||
<media:content url="http://example.org/audio/ph34r_my_podcast.mp3" type="audio/mpeg"/>
|
||||
</item>
|
||||
<item>
|
||||
<title>Star City</title>
|
||||
<link>http://liftoff.msfc.nasa.gov/news/2003/news-starcity.asp</link>
|
||||
<guid isPermaLink="true">http://liftoff.msfc.nasa.gov/news/2003/news-starcity.asp</guid>
|
||||
<pubDate>Tue, 03 Jun 2003 09:39:21 +0000</pubDate>
|
||||
<description>How do Americans get ready to work with Russians aboard the International Space Station? They take a crash course in culture, language and protocol at Russia's <a href="http://howe.iki.rssi.ru/GCTC/gctc_e.htm">Star City</a>.</description>
|
||||
</item>
|
||||
</channel>
|
||||
</rss>
|
10
tests/Formats/samples/expectedMrssFormat/feed.empty.xml
Normal file
10
tests/Formats/samples/expectedMrssFormat/feed.empty.xml
Normal file
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0"?>
|
||||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:media="http://search.yahoo.com/mrss/">
|
||||
<channel>
|
||||
<title>Sample feed with minimum data</title>
|
||||
<link>https://github.com/RSS-Bridge/rss-bridge/</link>
|
||||
<description>Sample feed with minimum data</description>
|
||||
<atom:link href="https://github.com/RSS-Bridge/rss-bridge/" rel="alternate" type="text/html"/>
|
||||
<atom:link href="https://example.com/feed" rel="self" type="application/atom+xml"/>
|
||||
</channel>
|
||||
</rss>
|
19
tests/Formats/samples/expectedMrssFormat/feed.emptyItems.xml
Normal file
19
tests/Formats/samples/expectedMrssFormat/feed.emptyItems.xml
Normal file
@@ -0,0 +1,19 @@
|
||||
<?xml version="1.0"?>
|
||||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:media="http://search.yahoo.com/mrss/">
|
||||
<channel>
|
||||
<title>Sample feed with minimum data</title>
|
||||
<link>https://github.com/RSS-Bridge/rss-bridge/</link>
|
||||
<description>Sample feed with minimum data</description>
|
||||
<atom:link href="https://github.com/RSS-Bridge/rss-bridge/" rel="alternate" type="text/html"/>
|
||||
<atom:link href="https://example.com/feed" rel="self" type="application/atom+xml"/>
|
||||
|
||||
<item>
|
||||
<title>Sample Item #1</title>
|
||||
<guid isPermaLink="false">29f59918d266c56a935da13e4122b524298e5a39</guid>
|
||||
</item>
|
||||
<item>
|
||||
<title>Sample Item #2</title>
|
||||
<guid isPermaLink="false">edf358cad1a7ae255d6bc97640dd9d27738f1b7b</guid>
|
||||
</item>
|
||||
</channel>
|
||||
</rss>
|
26
tests/Formats/samples/expectedMrssFormat/feed.microblog.xml
Normal file
26
tests/Formats/samples/expectedMrssFormat/feed.microblog.xml
Normal file
@@ -0,0 +1,26 @@
|
||||
<?xml version="1.0"?>
|
||||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:media="http://search.yahoo.com/mrss/">
|
||||
<channel>
|
||||
<title>Sample microblog feed</title>
|
||||
<link>https://example.com/blog/</link>
|
||||
<description>Sample microblog feed</description>
|
||||
<image>
|
||||
<url>https://example.com/logo.png</url>
|
||||
<title>Sample microblog feed</title>
|
||||
<link>https://example.com/blog/</link>
|
||||
</image>
|
||||
<atom:link href="https://example.com/blog/" rel="alternate" type="text/html"/>
|
||||
<atom:link href="https://example.com/feed" rel="self" type="application/atom+xml"/>
|
||||
|
||||
<item>
|
||||
<guid isPermaLink="false">1918f084648b82057c1dd3faa3d091da82a6fac2</guid>
|
||||
<pubDate>Sun, 07 Oct 2018 16:53:03 +0000</pubDate>
|
||||
<description>Oh 😲 I found three monkeys 🙈🙉🙊</description>
|
||||
</item>
|
||||
<item>
|
||||
<guid isPermaLink="false">e62189168a06dfa74f61c621c79c33c4c8517e1f</guid>
|
||||
<pubDate>Sun, 07 Oct 2018 16:38:17 +0000</pubDate>
|
||||
<description>Something happened</description>
|
||||
</item>
|
||||
</channel>
|
||||
</rss>
|
Reference in New Issue
Block a user