public function test_validates() { $user = new Users(); $user->username = '******'; $user->password = '******'; $user->access_token = 'token'; $user->save(); /* @var $user_db Users */ $user_db = Users::getUserByUsername('yurii'); $this->assertTrue($user_db->validatePassword('pass')); $this->assertTrue($user_db->validateAuthKey($user->auth_key)); }