Esempio n. 1
0
 public function testBadUserGetTopTagsForArtist()
 {
     try {
         $as = new Zend_Service_Audioscrobbler();
         $response = $as->userGetTopTagsForArtist();
     } catch (Exception $e) {
         return;
     }
     $this->fail("Function did not throw exception based on bad parameters");
 }
Esempio n. 2
0
 /**
  * Ensures that userGetTopTagsForArtist() throws an exception when based on bad parameters
  *
  * @return void
  */
 public function testBadUserGetTopTagsForArtist()
 {
     $testingResponse = "HTTP/1.1 200 OK\r\n" . "Content-type: text/xml\r\n" . "\r\n" . "ERROR: Missing 'subject' parameter in querystring";
     $as = new Zend_Service_Audioscrobbler(true, $testingResponse);
     try {
         $response = $as->userGetTopTagsForArtist();
         $this->fail('userGetTopTagsForArtist() did not throw exception based on bad parameters');
     } catch (Zend_Service_Exception $e) {
         $this->assertContains('SimpleXML', $e->getMessage());
     }
 }
Esempio n. 3
0
 public function testBadUserGetTopTagsForArtist()
 {
     try {
         $testing_response = "HTTP/1.1 200 OK\r\n" . "Content-type: text/xml\r\n" . "\r\n" . "ERROR: Missing 'subject' parameter in querystring";
         $as = new Zend_Service_Audioscrobbler(TRUE, $testing_response);
         $response = $as->userGetTopTagsForArtist();
     } catch (Exception $e) {
         return;
     }
     $this->fail("Function did not throw exception based on bad parameters");
 }