header . ' '; $this->setAudioscrobblerResponse($testing_response); $as = $this->getAudioscrobblerService(); $as->set('group', urlencode('Jazz Club')); $response = $as->groupGetWeeklyChartList(); $chart = $response->chart[0]; $this->assertEquals((int)$chart['from'], 1159099200); $this->assertEquals((string)$response['group'], 'Jazz Club'); } public function testWeeklyArtistChartList() { $testing_response = $this->header . ' Miles Davis 561d854a-6a28-4aa7-8c99-323e6ce46c2a 1 194 http://www.last.fm/music/Miles+Davis The Beatles b10bbbfc-cf9e-42e0-be17-e2c3e1d2600d 2 156 http://www.last.fm/music/The+Beatles Pink Floyd 83d91898-7763-47d7-b03b-b92132375c47 3 132 http://www.last.fm/music/Pink+Floyd John Coltrane b625448e-bf4a-41c3-a421-72ad46cdb831 4 124 http://www.last.fm/music/John+Coltrane Radiohead a74b1b7f-71a5-4011-9441-d0b5e4122711 4 124 http://www.last.fm/music/Radiohead Herbie Hancock 27613b78-1b9d-4ec3-9db5-fa0743465fdd 6 106 http://www.last.fm/music/Herbie+Hancock Led Zeppelin 678d88b2-87b0-403b-b63d-5da7465aecc3 7 104 http://www.last.fm/music/Led+Zeppelin David Bowie 5441c29d-3602-4898-b1a1-b77fa23b8e50 8 102 http://www.last.fm/music/David+Bowie AIR cb67438a-7f50-4f2b-a6f1-2bb2729fd538 9 96 http://www.last.fm/music/AIR Red Hot Chili Peppers 8bfac288-ccc5-448d-9573-c33ea2aa5c30 9 96 http://www.last.fm/music/Red+Hot+Chili+Peppers '; $this->setAudioscrobblerResponse($testing_response); $as = $this->getAudioscrobblerService(); $as->set('group', urlencode('Jazz Club')); $response = $as->groupGetWeeklyArtistChartList(); $this->assertNotNull(count($response)); $artist = $response->artist[1]; $this->assertEquals((string)$artist->name, 'The Beatles'); $this->assertEquals((string)$artist->url, 'http://www.last.fm/music/The+Beatles'); $this->assertEquals((string)$response['group'], 'Jazz Club'); } public function testWeeklyAlbumChartList() { $testing_response = $this->header . ' Miles Davis Kind of Blue bee5e0cd-1767-4a8e-9578-6455e87ba60b 1 56 http://www.last.fm/music/Miles+Davis/Kind+of+Blue Radiohead OK Computer fba5f8fe-c6c8-4511-8562-c9febf482674 2 42 http://www.last.fm/music/Radiohead/OK+Computer Portishead Dummy 87888070-1b25-4830-aebc-dee490058b74 3 37 http://www.last.fm/music/Portishead/Dummy The Arcade Fire Funeral 3 37 http://www.last.fm/music/The+Arcade+Fire/Funeral Coldplay A Rush of Blood to the Head b83b32dd-aa1a-4f18-a5af-00e418041617 5 34 http://www.last.fm/music/Coldplay/A+Rush+of+Blood+to+the+Head The Beatles Abbey Road 03503af3-a0e0-4f7e-8a0d-a1cd4d7225c5 6 32 http://www.last.fm/music/The+Beatles/Abbey+Road The Beatles Rubber Soul 34b8cb33-5f91-4e0c-b4ec-3fb2d3f2f926 6 32 http://www.last.fm/music/The+Beatles/Rubber+Soul Massive Attack Mezzanine 0d33ef7a-1f5d-4365-b807-b412271b99c3 8 31 http://www.last.fm/music/Massive+Attack/Mezzanine Coldplay Parachutes 8fb50f96-279e-4d44-92aa-d49ea56f5c08 8 31 http://www.last.fm/music/Coldplay/Parachutes Gnarls Barkley St. Elsewhere 8 31 http://www.last.fm/music/Gnarls+Barkley/St.+Elsewhere '; $this->setAudioscrobblerResponse($testing_response); $as = $this->getAudioscrobblerService(); $as->set('group', urlencode('Jazz Club')); $response = $as->groupGetWeeklyAlbumChartList(); $this->assertNotNull(count($response)); $album = $response->album[0]; $this->assertEquals((string)$album->artist, 'Miles Davis'); $this->assertEquals((string)$album->name, 'Kind of Blue'); $this->assertEquals((string)$album->chartposition, 1); $this->assertEquals((string)$response['group'], 'Jazz Club'); } public function testPreviousWeeklyChartList() { $testing_response = $this->header . ' '; $this->setAudioscrobblerResponse($testing_response); $as = $this->getAudioscrobblerService(); $as->set('group', urlencode('Jazz Club')); $from = 1114965332; $to = 1115570132; $response = $as->groupGetWeeklyChartList($from, $to); $this->assertNotNull(count($response)); $this->assertEquals((string)$response['group'], 'Jazz Club'); $this->assertEquals((int)$response['from'], $from); $this->assertEquals((int)$response['to'], $to); } }