Index: ReaderTest.php =================================================================== --- ReaderTest.php (Revision 19126) +++ ReaderTest.php (Arbeitskopie) @@ -270,6 +270,29 @@ $this->assertEquals('http://meiobit.com/rss.xml', $links->rss); } + /** + * @group ZF-8330 + */ + public function testGetsFeedLinksAndNormalisesRelativeUrlsOnUriWithPath() + { + try { + $currClient = Zend_Feed_Reader::getHttpClient(); + + $testAdapter = new Zend_Http_Client_Adapter_Test(); + $testAdapter->setResponse(new Zend_Http_Response(200, array(), '')); + Zend_Feed_Reader::setHttpClient(new Zend_Http_Client(null, array('adapter' => $testAdapter))); + + $links = Zend_Feed_Reader::findFeedLinks('http://foo/bar'); + + Zend_Feed_Reader::setHttpClient($currClient); + } catch(Exception $e) { + $this->fail($e->getMessage()); + } + + $this->assertEquals('http://foo/test.rss', $links->rss); + $this->assertEquals('http://foo/test.atom', $links->atom); + } + public function testAddsPrefixPath() { Zend_Feed_Reader::addPrefixPath('A_B_C', '/A/B/C');