Sample REST API using laravel lumen micro-framework.
Run command composer install
- Rename
.env.sample
into.env
, and configure the proper configuration value, especially for the database configuration. - Create a database with the same name as declared in
.env
file before. - Run command
php artisan migrate
to create database tables.
Run command php -S <HOST>:<PORT> -t public
(HOST and PORT should match with the given value in .env
file)
- Open
phpunit.xml
file and set the database name atDB_DATABASE
env key. - Create a database with the same name as the given value in
phpunit.xml
.
Run the command ./vendor/bin/phpunit tests/ProductControllerTests