public function testGetTopAlbums() { try { $testing_response = $this->header . '<?xml version="1.0" encoding="UTF-8"?> <tag tag="rock" count="786251"> <album name="Fallen" count="79" streamable="yes"> <artist name="Evanescence"> <mbid>f4a31f0a-51dd-4fa7-986d-3095c40c5ed9</mbid> <url>http://www.last.fm/music/Evanescence</url> </artist> <url>http://www.last.fm/music/Evanescence/Fallen</url> <coverart> <small>http://images.amazon.com/images/P/B00008US8R.01._SCMZZZZZZZ_.jpg</small> <medium>http://images.amazon.com/images/P/B00008US8R.01._SCMZZZZZZZ_.jpg</medium> <large>http://images.amazon.com/images/P/B00008US8R.01._SCMZZZZZZZ_.jpg</large> </coverart> </album> <album name="Elephant" count="74" streamable="yes"> <artist name="The White Stripes"> <mbid>11ae9fbb-f3d7-4a47-936f-4c0a04d3b3b5</mbid> <url>http://www.last.fm/music/The+White+Stripes</url> </artist> <url>http://www.last.fm/music/The+White+Stripes/Elephant</url> <coverart> <small>http://images-eu.amazon.com/images/P/B00007KN36.02.THUMBZZZ.jpg</small> <medium>http://images-eu.amazon.com/images/P/B00007KN36.02.MZZZZZZZ.jpg</medium> <large>http://images-eu.amazon.com/images/P/B00007KN36.02.LZZZZZZZ.jpg</large> </coverart> </album> </tag> '; $as = new Zend_Service_Audioscrobbler(TRUE, $testing_response); $as->set('tag', 'Rock'); $response = $as->tagGetTopAlbums(); $this->assertNotNull(count($response->album)); $this->assertEquals((string) $response['tag'], strtolower($as->get('tag'))); } catch (Exception $e) { $this->fail("Exception: [" . $e->getMessage() . "] thrown by test"); } }