public function testUpdateUser()
 {
     $user = new User();
     $user->setTitle(Utils::randomString());
     $user->setName(Utils::randomString());
     $resp = Utils::getBuddy()->getApiProfile()->editAuthenticatedUser($user);
     $this->assertInstanceOf('Buddy\\Objects\\User', $resp);
     $this->assertEquals($user->getName(), $resp->getName());
     $this->assertEquals($user->getTitle(), $resp->getTitle());
 }
 public function editAuthenticatedUser()
 {
     try {
         $buddy = new Buddy(['accessToken' => 'yourAccessToken']);
         $user = new User();
         $user->setName('My new name');
         $resp = $buddy->getApiProfile()->editAuthenticatedUser($user);
         var_dump($resp);
         exit;
     } catch (BuddyResponseException $e) {
         echo $e->getMessage();
         exit;
     } catch (BuddySDKException $e) {
         echo $e->getMessage();
         exit;
     }
 }