diff --git a/php/tests/ExampleTest.php b/php/tests/ExampleTest.php deleted file mode 100644 index 5d0a193..0000000 --- a/php/tests/ExampleTest.php +++ /dev/null @@ -1,5 +0,0 @@ -toBeTrue(); -}); diff --git a/php/tests/FizzBuzzTest.php b/php/tests/FizzBuzzTest.php new file mode 100644 index 0000000..62e4330 --- /dev/null +++ b/php/tests/FizzBuzzTest.php @@ -0,0 +1,40 @@ +toBe($expected); +})->with([ + [1, '1'], + [2, '2'], + [4, '4'], + [7, '7'], + [8, '8'], +]); + +test('Numbers divisible by or containing 3 should return "Fizz"', function ($input) { + expect(FizzBuzz($input))->toBe('Fizz'); +})->with([3, 6, 9, 13]); + +test('Numbers divisible by or containing 5 should return "Buzz"', function ($input) { + expect(FizzBuzz($input))->toBe('Buzz'); +})->with([5, 10, 20, 52]); + +test('Numbers divisible by or containing 5 or divisible or containing 3 should return "FizzBuzz"', function ($input) { + expect(FizzBuzz($input))->toBe('FizzBuzz'); +})->with([15, 30, 35, 53]); \ No newline at end of file