Files
shopit-back/tests
ncoronel 45e92602ed feat(ticketing): add entry reservations management for admin app
- Introduced new routes for entry reservations in admin app, including form, index, store, and download functionalities.
- Created a migration to add the "Reserva de Tickets" menu item to the admin app.
- Updated MenuSeeder to include the new menu item for ticket reservations.
- Developed a PDF view for entry reservations.
- Implemented tests for the EntryReservationController and EntryReservationService to ensure proper functionality and access control.
- Refactored test setup to use a dedicated schema creation trait for better isolation and maintainability.
2026-10-02 12:20:25 -03:00
..

Database isolation

Run the suite with composer test or vendor/bin/phpunit. Both use tests/bootstrap.php, which forces SQLite :memory: in all environment sources. Tests never need a MySQL test database or the local database credentials.

Tests\TestCase rejects cached configuration and validates the default connection before application providers boot. Its connection factory also rejects persistent databases, URLs, and alternate endpoints for named or dynamically built connections. Tests that need Laravel must extend this base class. Do not bypass these guards to make a failing test pass; adapt database-specific tests to SQLite or use a separately designed disposable database workflow.

php tests/verify-database-safety.php checks the guard and application wiring without running test setup, queries, migrations, or opening PDO connections.

The suite does not validate MySQL-specific behavior when using SQLite.