- Make sure you have Docker and Composer installed
- Go to the project root directory
- Run
composer install
- Run
docker-compose build
- Run
docker-compose up -d
- Go to http://localhost:8081 since we are exposing port
8081
- GET
/time/health-check
- Response
- Code: Ok, 200
- Body:
{ "message": "I am alive!" }
- GET
/time/mars/{time}
- Request
- (time) query param: (String), "ISO 8601" Format DateTime
- Example:
2020-02-25T10:31:15+0000
- Wiki: https://en.wikipedia.org/wiki/ISO_8601
- Response
- Success
- Code: Ok, 200
- Body:
{ "Earth": { "Milli": <xxxxxxxxxxxxx> Milliseconds DateTime }, "Mars": { "MSD": <xxx.yyy> Float Number, "MTC": <hh:mm:ss> Time Format } }
- Fail
- Code: Bad Request, 400
- Body:
{ "source": "<Response Source>", "errors": [ <Error Message> ] }
- Success
- Unit Test
- Run
./vendor/bin/phpunit tests/Unit
- Run
- Functional Test
- Run
./vendor/bin/phpunit tests/Functional
- Run
- General
- Run
./vendor/bin/phpunit tests
- Run