public function testUserGetTopTagsForTrack() { try { $testing_response = "HTTP/1.1 200 OK\r\n" . "Content-type: text/xml\r\n" . "\r\n" . '<?xml version="1.0" encoding="UTF-8"?> <tracktags user="******" artist="Metallica" track="Nothing Else Matters"> </tracktags>'; $as = new Zend_Service_Audioscrobbler(true, $testing_response); $as->set('user', 'RJ'); $as->set('artist', 'Metallica'); $as->set('track', 'Nothing Else Matters'); $response = $as->userGetTopTagsForTrack(); $this->assertEquals((string) $response['user'], 'RJ'); $this->assertEquals((string) $response['artist'], 'Metallica'); $this->assertEquals((string) $response['track'], 'Nothing Else Matters'); } catch (Exception $e) { $this->fail("Exception: ]" . $e->getMessage() . "] thrown by test"); } }
public function testUserGetTopTagsForTrack() { try { $as = new Zend_Service_Audioscrobbler(); $as->set('user', 'RJ'); $as->set('artist', 'Metallica'); $as->set('track', 'Nothing Else Matters'); $response = $as->userGetTopTagsForTrack(); $this->assertEquals($response['user'], 'RJ'); $this->assertEquals($response['artist'], 'Metallica'); $this->assertEquals($response['track'], 'Nothing Else Matters'); $this->assertNotNull($response->tracktags); } catch (Exception $e) { $this->fail("Exception: ]" . $e->getMessage() . "] thrown by test"); } }