Exemplo n.º 1
0
 public function testdeleteByUser()
 {
     //execute the method and test if it works and does not throws an exception.
     try {
         OAuthToken::deleteByUser('1');
         $this->assertTrue(true);
     } catch (Exception $e) {
         $this->fail();
     }
 }
Exemplo n.º 2
0
 /**
  * Create oauth token for the SNIP user
  * @param User $user
  */
 protected function deleteSnipTokens($user)
 {
     $consumer = $this->getSnipConsumer();
     if (!empty($consumer)) {
         OAuthToken::deleteByConsumer($consumer->id);
     }
     OAuthToken::deleteByUser($user->id);
 }
Exemplo n.º 3
0
 public static function tearDownAfterClass()
 {
     OAuthToken::deleteByUser($GLOBALS['current_user']->id);
     SugarTestHelper::tearDown();
 }