Before the start, please init the database first and set all the variables with DB_
suffix, at .env and .env.testing for tests respectively!
# run psql
psql -U postgres
-- Create Users
CREATE USER "laravel" WITH PASSWORD 'laravel_password';
CREATE USER "tester" WITH PASSWORD 'tester_password';
-- Or just give grant access to an existing user(s)
GRANT ALL PRIVILEGES ON DATABASE "your_db_name" to "your_username";
-- Create Databases
CREATE DATABASE "laravel" OWNER "your_laravel_username";
CREATE DATABASE "laravel_testing" OWNER "your_tester_username";
# For unix systems run bash script
./init
# For windows systems run cmd script:
init.cmd
# ( ! ) Make sure you have configured your database
# and environments before running the application
# To serve in dev mode type
composer run dev
# ( ! ) Make sure you have configured your DB with
# environments first
# ( ! ) It is important to clear the configuration
# before starting testing
php artisan config:clear
# Run all tests
php artisan test --env=testing
# Run specific tests
php artisan test --env=testing --filter GenreTest
php artisan test --env=testing --filter MovieTest