get('/api/_test/ceiling-render', function () use ($exceptionClass) { throw new $exceptionClass; }); $response = $this->getJson('/api/_test/ceiling-render'); $response->assertStatus(403); $response->assertJson([ 'success' => false, 'message' => __($langKey), ]); } /** * 예외 3종 × 대응 lang 키 * * @return array */ public static function ceilingExceptionProvider(): array { return [ 'super admin 보호' => [CannotModifySuperAdminException::class, 'exceptions.cannot_modify_super_admin'], '보호 역할' => [CannotModifyProtectedRoleException::class, 'exceptions.cannot_modify_protected_role'], '권한 상승' => [PermissionEscalationException::class, 'exceptions.cannot_grant_unheld_permission'], ]; } }