header .
'
http://www.last.fm/user/suhis/
http://static.last.fm/depth/catalogue/noimage/nouser_140px.jpg
2816666
http://www.last.fm/user/M4lu5/
http://static.last.fm/avatar/ea9c0ddf6b6cc236dfc4297e376e9901.jpg
2380500
http://www.last.fm/user/Ceniza666/
http://static.last.fm/depth/catalogue/noimage/nouser_140px.jpg
1352000
';
$this->setAudioscrobblerResponse($testing_response);
$as = $this->getAudioscrobblerService();
$as->set('artist', 'Metallica');
$as->set('track', 'Enter Sandman');
$response = $as->trackGetTopFans();
$this->assertEquals((string)$response['artist'], 'Metallica');
$this->assertEquals((string)$response['track'], 'Enter Sandman');
$this->assertNotNull(count($response->user));
}
public function testGetTopTags()
{
$testing_response = $this->header .
'
metal
100
http://www.last.fm/tag/metal
heavy metal
55
http://www.last.fm/tag/heavy%20metal
rock
21
http://www.last.fm/tag/rock
';
$this->setAudioscrobblerResponse($testing_response);
$as = $this->getAudioscrobblerService();
$as->set('artist', 'Metallica');
$as->set('track', 'Enter Sandman');
$response = $as->trackGetTopTags();
$this->assertNotNull(count($response->tag));
$this->assertEquals((string)$response['artist'], 'Metallica');
$this->assertEquals((string)$response['track'], 'Enter Sandman');
}
}