This solution for the Howsy Code Challenge uses:
- PHP 8.1
- PHPUnit 9
- Mockery 1.5
- PHP DI 6.4
- Docker
- Docker Compose
- Clone the repo.
- Build the container. (this will also install composer dependencies)
docker-compose build
- Run the container.
docker-compose up -d
- Run the tests.
docker-compose exec app ./vendor/bin/phpunit --testdox tests
or
docker-compose exec app ./vendor/bin/phpunit tests
- Run demo app.
docker-compose exec app docker-compose exec app php index.php
you can customize the contract period changing the variable $period in ./src/index.php:14
$period = 12;
- Evaluate code! 😉