discoverFromHTML($url, $html); $this->assertEquals($expected, $url); } static public function provider() { $sampleHeader = << leŭksman END; return array( array('http://example.com/', '', 'http://example.com/feed/rss'), array('http://example.com/atom', '', 'http://example.com/feed/atom'), array('http://example.com/empty', '', false), array('http://example.com/tagsoup', '
',
                           'http://example.com/feed/rss'),
                     array('http://example.com/relative/link2',
                           '',
                           'http://example.com/feed/rss'),
                     // This one can't resolve correctly; relative link is bogus.
                     array('http://example.com/relative/link3',
                           '',
                           'http:/feed/rss'),
                     array('http://example.com/base/link1',
                           '',
                           'http://target.example.com/feed/rss'),
                     array('http://example.com/base/link2',
                           '',
                           'http://target.example.com/feed/rss'),
                     // This one can't resolve; relative link is bogus.
                     array('http://example.com/base/link3',
                           '',
                           'http:/feed/rss'),
                     // Trick question! There's a  but no href on it
                     array('http://example.com/relative/fauxbase',
                           '',
                           'http://example.com/feed/rss'),
                     // Actual WordPress blog header example
                     array('http://leuksman.com/log/',
                           $sampleHeader,
                           'http://leuksman.com/log/feed/'));
    }
}