/** * Check if your exist * * @param string $username * @return boolean * @throws \Exception When user doesn't exist */ public function UserExists($username) { try { $user = $this->db->get($username); if (empty($user)) { throw new \Exception("User doesn't Exist"); } return true; } catch (\Exception $e) { Log::instance()->log($e->getMessage(), __FILE__, __METHOD__, __LINE__); return false; } }
public function setUp() { $this->log = Log::instance('test.log'); }