Skip to content

Fully tested approach on FizzBuzz written in PHP.

Notifications You must be signed in to change notification settings

YasinY/FizzBuzzPro

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FizzBuzz

This project is about displaying different outputs for numeric values - every product of 3 should output "Fizz", every product of 5 "Buzz", and the product of both "FizzBuzz" (3 + 5).

It uses PSR-4 Autoloading for simple namespaces, in case further development is being done on this. It also is fully unit tested.

To run this project, please ensure you have PHP 7.4+ and composer installed.

If that's not the case, please refer to the following Downloads (most commonly used OS):
PHP:

Composer:

Once you have successfully configured composer and PHP, simply clone this repository, navigate to it through the Terminal/Command Prompt and enter the following commands:

composer install --ignore-platform-reqs

Your Terminal/Command Prompt should look like this:
image

Now that you have all necessary dependencies/autoload maps configured, execute the following command to run this project:

php index.php

Expected output when running php:
image

Congratulations, you've successfuly ran the program! :)

To run Tests, enter the following command from the base of this directory! Please make sure you've installed composer as mentioned above!
Windows: "./vendor/bin/phpunit" test --coverage-text
MAC: ./vendor/bin/phpunit test --coverage-text

Expected output:
image

Exit codes:
1 - Not permitted Division by Zero.
2 - Not supported Value.

About

Fully tested approach on FizzBuzz written in PHP.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages