diff --git a/tests/cases/ImportExport/TestOPML.php b/tests/cases/ImportExport/TestOPML.php index 59ea9c1..0002f2c 100644 --- a/tests/cases/ImportExport/TestOPML.php +++ b/tests/cases/ImportExport/TestOPML.php @@ -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], ]]], ]; } diff --git a/tests/docroot/Import/OPML/MixedContent.opml b/tests/docroot/Import/OPML/MixedContent.opml new file mode 100644 index 0000000..db65a2c --- /dev/null +++ b/tests/docroot/Import/OPML/MixedContent.opml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + +