Wolrbank REST API use Laravel Framework for getting data from worldbank about lending types and income levels in every country in world. Currentyl for this example authentication access is saved in sqlite database.
- Clone the repository locally
- Install depedencies with composer Install
- Run web server:
php artisan serve
- Access the web in address:
127.0.0.1:8000
For authentication when accessing API Endpoint in this example, you can use:
- username:
[email protected]
- password:
admin123
- Install PHPUnit using phar or composer. Refer to this for installation details.
- Go to project root and type the following command:
phpunit
. This will execute all tests inTests
directory.
- Make sure you have nodejs >= 4 and latest npm installed
- Install dredd via npm:
npm install -g [email protected]
- Install dredd-hooks-php in root project:
composer require ddelnano/dredd-hooks-php:~1.0.0
- Go to project root and type the following command:
dredd
This will execute all tests in API Endpoint in fileapiary.apib
from Apiary Docs
For getting information about the use of API Endpoint, please refer to this: WorldBank-API Documentation