1
1
Fork 0
mirror of https://code.mensbeam.com/MensBeam/Arsse.git synced 2024-12-22 13:12:41 +00:00

Mixed content test for OPML

This commit is contained in:
J. King 2019-05-08 20:24:16 -04:00
parent 0f7d49c21e
commit be5a1fb94f
2 changed files with 46 additions and 66 deletions

View file

@ -129,75 +129,35 @@ OPML_EXPORT_SERIALIZATION;
["Empty.2.opml", false, [[], []]],
["Empty.3.opml", false, [[], []]],
["FeedsOnly.opml", false, [[
[
'url' => "http://example.com/1",
'title' => "Feed 1",
'folder' => 0,
'tags' => [],
],
[
'url' => "http://example.com/2",
'title' => "",
'folder' => 0,
'tags' => [],
],
[
'url' => "http://example.com/3",
'title' => "",
'folder' => 0,
'tags' => [],
],
[
'url' => "http://example.com/4",
'title' => "",
'folder' => 0,
'tags' => [],
],
[
'url' => "",
'title' => "",
'folder' => 0,
'tags' => ["whee"],
],
[
'url' => "",
'title' => "",
'folder' => 0,
'tags' => ["whee", "whoo", ""],
],
['url' => "http://example.com/1", 'title' => "Feed 1", 'folder' => 0, 'tags' => []],
['url' => "http://example.com/2", 'title' => "", 'folder' => 0, 'tags' => []],
['url' => "http://example.com/3", 'title' => "", 'folder' => 0, 'tags' => []],
['url' => "http://example.com/4", 'title' => "", 'folder' => 0, 'tags' => []],
['url' => "", 'title' => "", 'folder' => 0, 'tags' => ["whee"]],
['url' => "", 'title' => "", 'folder' => 0, 'tags' => ["whee", "whoo", ""]],
], []]],
["FoldersOnly.opml", true, [[], []]],
["FoldersOnly.opml", false, [[], [1 =>
[
'id' => 1,
'name' => "Folder 1",
'parent' => 0,
],
[
'id' => 2,
'name' => "Folder 2",
'parent' => 0,
],
[
'id' => 3,
'name' => "Also a folder",
'parent' => 2,
],
[
'id' => 4,
'name' => "Still a folder",
'parent' => 2,
],
[
'id' => 5,
'name' => "Folder 5",
'parent' => 4,
],
[
'id' => 6,
'name' => "Folder 6",
'parent' => 0,
],
['id' => 1, 'name' => "Folder 1", 'parent' => 0],
['id' => 2, 'name' => "Folder 2", 'parent' => 0],
['id' => 3, 'name' => "Also a folder", 'parent' => 2],
['id' => 4, 'name' => "Still a folder", 'parent' => 2],
['id' => 5, 'name' => "Folder 5", 'parent' => 4],
['id' => 6, 'name' => "Folder 6", 'parent' => 0],
]]],
["MixedContent.opml", false, [[
['url' => "https://www.jpl.nasa.gov/multimedia/rss/news.xml", 'title' => "NASA JPL", 'folder' => 3, 'tags' => ["tech"]],
['url' => "http://feeds.arstechnica.com/arstechnica/index/", 'title' => "Ars Technica", 'folder' => 2, 'tags' => ["frequent", "tech"]],
['url' => "https://www.thestar.com/content/thestar/feed.RSSManagerServlet.topstories.rss", 'title' => "Toronto Star", 'folder' => 5, 'tags' => ["news", "canada", "toronto"]],
['url' => "http://rss.canada.com/get/?F239", 'title' => "Ottawa Citizen", 'folder' => 6, 'tags' => ["news", "canada"]],
['url' => "https://www.eurogamer.net/?format=rss", 'title' => "Eurogamer", 'folder' => 0, 'tags' => ["gaming", "frequent"]],
], [1 =>
['id' => 1, 'name' => "Photography", 'parent' => 0],
['id' => 2, 'name' => "Science", 'parent' => 0],
['id' => 3, 'name' => "Rocketry", 'parent' => 2],
['id' => 4, 'name' => "Politics", 'parent' => 0],
['id' => 5, 'name' => "Local", 'parent' => 4],
['id' => 6, 'name' => "National", 'parent' => 4],
]]],
];
}

View file

@ -0,0 +1,20 @@
<opml>
<body>
<outline text="Photography"/>
<outline text="Science">
<outline text="Rocketry">
<outline type="rss" text="NASA JPL" xmlUrl="https://www.jpl.nasa.gov/multimedia/rss/news.xml" category="tech"/>
</outline>
<outline type="rss" text="Ars Technica" xmlUrl="http://feeds.arstechnica.com/arstechnica/index/" category="frequent,tech"/>
</outline>
<outline text="Politics">
<outline text="Local">
<outline type="rss" text="Toronto Star" xmlUrl="https://www.thestar.com/content/thestar/feed.RSSManagerServlet.topstories.rss" category="news,canada,toronto"/>
</outline>
<outline text="National">
<outline type="rss" text="Ottawa Citizen" xmlUrl="http://rss.canada.com/get/?F239" category="news,canada"/>
</outline>
</outline>
<outline type="rss" text="Eurogamer" xmlUrl="https://www.eurogamer.net/?format=rss" category="gaming,frequent"/>
</body>
</opml>