Esempio n. 1
0
 public function testGetBadProfileInfo()
 {
     $as = new Zend_Service_Audioscrobbler();
     $as->set('user', 'kljadsfjllkj');
     try {
         $response = $as->userGetProfileInformation();
     } catch (Exception $e) {
         return;
     }
     $this->fail('Exception was not thrown when submitting bad user info');
 }
 public function testRequestThrowsHttpClientExceptionWithoutSuccessfulResponse()
 {
     $as = new Zend_Service_Audioscrobbler(true, self::readTestResponse('errorResponseStatusError'));
     $as->set('user', 'foobarfoo');
     try {
         $response = $as->userGetProfileInformation();
         $this->fail('Expected Zend_Service_Technorati_Exception not thrown');
     } catch (Zend_Http_Client_Exception $e) {
         $this->assertContains("404", $e->getMessage());
     }
 }
Esempio n. 3
0
 public function testGetBadProfileInfo()
 {
     $this->markTestSkipped('Invalid test, communicating with the outside world!');
     $as = new Zend_Service_Audioscrobbler();
     $as->set('user', 'kljadsfjllkj');
     try {
         $response = $as->userGetProfileInformation();
         $this->assertNull($response);
     } catch (Exception $e) {
         return;
     }
     $this->fail('Exception was not thrown when submitting bad user info');
 }