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(); } }
/** * 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); }
public static function tearDownAfterClass() { OAuthToken::deleteByUser($GLOBALS['current_user']->id); SugarTestHelper::tearDown(); }