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'),
                     array('http://example.com/relative/link3',
                           '',
                           'http://example.com/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'),
                     array('http://example.com/base/link3',
                           '',
                           'http://target.example.com/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/'));
    }
}