Write a class with a method that takes 2 integers between 1 and 100. Loop from the first integer to the second integer. Write out each integer. If the integer is divisible by 3 also print out “fizz” If the integer is divisible by 5 also print out “buzz”
Before you write any other code write some unit tests
As we are developing Enterprise Software we will paying particular attention to:
- Code clarity and ease of understating
- Well commented code that gives clear and appropriate explanations
- Code that shows an understanding of Enterprise Software development requirements. i.e. we are just as interested in failure modes as in the happy path.
- Code should demonstrate understanding of the features of PHP 7.
- Install PHP 7.0 or greater
- Install composer (https://getcomposer.org/)
- Run
composer install
- Run the
index.php
file - Run PHPUnit tests,
./vendor/bin/phpunit --bootstrap ./vendor/autoload.php tests/