/** * 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 function testdeleteByConsumer() { //execute the method and test if it works and does not throws an exception. try { OAuthToken::deleteByConsumer('1'); $this->assertTrue(true); } catch (Exception $e) { $this->fail(); } }