Sample REST API using laravel lumen micro-framework.
Run command composer install
- Rename
.env.sampleinto.env, and configure the proper configuration value, especially for the database configuration. - Create a database with the same name as declared in
.envfile before. - Run command
php artisan migrateto 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.xmlfile and set the database name atDB_DATABASEenv key. - Create a database with the same name as the given value in
phpunit.xml.
Run the command ./vendor/bin/phpunit tests/ProductControllerTests