Skip to content

Latest commit

 

History

History
54 lines (37 loc) · 1.33 KB

README.md

File metadata and controls

54 lines (37 loc) · 1.33 KB

Introduction

Refresh your development skills through development focused tests created by others or by yourself

Quick Start

Requires Laravel Valet

# Copy and configure environment
cp .env.example .env

# Install dependencies
composer install
npm install

# Built the frontend
npm run dev

# Valet link the application
valet link refresher
valet secure

# Finally the app lives here: https://refresher.test

Testing

It is recommended to create a separate MySQL database for testing. The default configuration expects that there is a test database accessible by user: test:password. If you are lazy:

  1. Open MySQL: $ mysql

  2. Create the table and the user:

    -- Create the test database
    CREATE DATABASE IF NOT EXISTS test;
    
    -- Create the test user
    CREATE USER 'test'@'%' IDENTIFIED BY 'password';
    GRANT CREATE, ALTER, INDEX, LOCK TABLES, REFERENCES, UPDATE, DELETE, DROP, SELECT, INSERT ON `test`.* TO 'test'@'%';
    FLUSH PRIVILEGES;

Overriding environment

If you would like to configure your test environment variables, you can just cp phpunit.xml.dist phpunit.xml. The phpunit.xml is not tracked in our version control so feel free to change the variables there.

Running the tests

composer test