Clean up edge cases in OStatus FeedDiscoveryTest
This commit is contained in:
parent
067d37f864
commit
aa80d8fee3
@ -75,9 +75,10 @@ END;
|
|||||||
'<body><pre><LINK rel=alternate hRef=http://example.com/feed/rss type=application/rss+xml><fnork',
|
'<body><pre><LINK rel=alternate hRef=http://example.com/feed/rss type=application/rss+xml><fnork',
|
||||||
'http://example.com/feed/rss'),
|
'http://example.com/feed/rss'),
|
||||||
// 'rel' attribute must be lowercase, alone per http://www.rssboard.org/rss-autodiscovery
|
// 'rel' attribute must be lowercase, alone per http://www.rssboard.org/rss-autodiscovery
|
||||||
|
// but we're going to be liberal in what we receive.
|
||||||
array('http://example.com/tagsoup2',
|
array('http://example.com/tagsoup2',
|
||||||
'<body><pre><LINK rel=" feeders alternate 467" hRef=http://example.com/feed/rss type=application/rss+xml><fnork',
|
'<body><pre><LINK rel=" feeders alternate 467" hRef=http://example.com/feed/rss type=application/rss+xml><fnork',
|
||||||
false),
|
'http://example.com/feed/rss'),
|
||||||
array('http://example.com/tagsoup3',
|
array('http://example.com/tagsoup3',
|
||||||
'<body><pre><LINK rel=ALTERNATE hRef=http://example.com/feed/rss type=application/rss+xml><fnork',
|
'<body><pre><LINK rel=ALTERNATE hRef=http://example.com/feed/rss type=application/rss+xml><fnork',
|
||||||
false),
|
false),
|
||||||
@ -87,18 +88,20 @@ END;
|
|||||||
array('http://example.com/relative/link2',
|
array('http://example.com/relative/link2',
|
||||||
'<html><link rel="alternate" href="../feed/rss" type="application/rss+xml">',
|
'<html><link rel="alternate" href="../feed/rss" type="application/rss+xml">',
|
||||||
'http://example.com/feed/rss'),
|
'http://example.com/feed/rss'),
|
||||||
|
// This one can't resolve correctly; relative link is bogus.
|
||||||
array('http://example.com/relative/link3',
|
array('http://example.com/relative/link3',
|
||||||
'<html><link rel="alternate" href="http:/feed/rss" type="application/rss+xml">',
|
'<html><link rel="alternate" href="http:/feed/rss" type="application/rss+xml">',
|
||||||
'http://example.com/feed/rss'),
|
'http:/feed/rss'),
|
||||||
array('http://example.com/base/link1',
|
array('http://example.com/base/link1',
|
||||||
'<html><link rel="alternate" href="/feed/rss" type="application/rss+xml"><base href="http://target.example.com/">',
|
'<html><link rel="alternate" href="/feed/rss" type="application/rss+xml"><base href="http://target.example.com/">',
|
||||||
'http://target.example.com/feed/rss'),
|
'http://target.example.com/feed/rss'),
|
||||||
array('http://example.com/base/link2',
|
array('http://example.com/base/link2',
|
||||||
'<html><link rel="alternate" href="feed/rss" type="application/rss+xml"><base href="http://target.example.com/">',
|
'<html><link rel="alternate" href="feed/rss" type="application/rss+xml"><base href="http://target.example.com/">',
|
||||||
'http://target.example.com/feed/rss'),
|
'http://target.example.com/feed/rss'),
|
||||||
|
// This one can't resolve; relative link is bogus.
|
||||||
array('http://example.com/base/link3',
|
array('http://example.com/base/link3',
|
||||||
'<html><link rel="alternate" href="http:/feed/rss" type="application/rss+xml"><base href="http://target.example.com/">',
|
'<html><link rel="alternate" href="http:/feed/rss" type="application/rss+xml"><base href="http://target.example.com/">',
|
||||||
'http://target.example.com/feed/rss'),
|
'http:/feed/rss'),
|
||||||
// Trick question! There's a <base> but no href on it
|
// Trick question! There's a <base> but no href on it
|
||||||
array('http://example.com/relative/fauxbase',
|
array('http://example.com/relative/fauxbase',
|
||||||
'<html><link rel="alternate" href="../feed/rss" type="application/rss+xml"><base target="top">',
|
'<html><link rel="alternate" href="../feed/rss" type="application/rss+xml"><base target="top">',
|
||||||
|
Loading…
Reference in New Issue
Block a user