Exemple #1
0
 public function testDeleteUserImageMethod()
 {
     $imageId = 'image123';
     $params = array('userimage' => $imageId);
     $this->_mockXmlRpcClient('deleteUserimage', true, $params);
     $this->assertTrue($this->_gravatarXmlRpc->deleteUserImage($imageId));
 }
Exemple #2
0
 /**
  * Sets $_rating.
  *
  * @param int|string $rating
  * @return void
  */
 public function setRating($rating)
 {
     $validRatings = NP_Service_Gravatar_XmlRpc::getValidRatings();
     if (array_key_exists($rating, $validRatings)) {
         $this->_rating = $rating;
     } elseif (in_array($rating, $validRatings)) {
         $this->_rating = array_search($rating, $validRatings);
     } else {
         require_once 'NP/Service/Gravatar/XmlRpc/Exception.php';
         throw new NP_Service_Gravatar_XmlRpc_Exception('Invalid rating.');
     }
 }