Add comprehensive unit tests for Security, UserModel, and Validation utilities

- Implemented SecurityTest to validate token generation, CSRF protection, input sanitization, and rate limiting.
- Created UserModelTest to ensure correct database operations for user management, including creation, updating, banning, and fetching active users.
- Developed ValidationTest to verify input validation and sanitization for user IDs, nicknames, messages, and API requests.
- Introduced Security and Validation utility classes with methods for secure token generation, input sanitization, and comprehensive validation rules.
This commit is contained in:
Vincent 2025-09-30 21:22:28 -04:00
parent 5692874b10
commit 41cd7a4fd8
32 changed files with 5796 additions and 368 deletions

View file

@ -1,5 +1,5 @@
/* Reset and normalize styles */
* {
*, *::before, *::after {
margin: 0;
padding: 0;
box-sizing: border-box;
@ -10,7 +10,8 @@ body {
font-family: var(--font-family-primary);
background: var(--bg-darkest);
color: var(--text-primary);
height: 100vh;
min-height: 100vh;
min-height: 100dvh; /* Dynamic viewport height for mobile */
overflow: hidden;
position: relative;
}