-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFizzBuzzExtendedTest.php
executable file
·75 lines (58 loc) · 1.91 KB
/
FizzBuzzExtendedTest.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
<?php
namespace SergioDeCandelario\FizzBuzzExtendedKata;
/**
* Test
*
* @author Sergio de Candelario <sergio.decandelario@gmail.com>
*/
class FizzBuzzExtendedTest extends \PHPUnit_Framework_TestCase
{
public function test_normal_number_return_itself()
{
$stringCalculator = new StringCalculator(1);
$result = $stringCalculator->calculate();
$this->assertEquals(1, $result);
}
public function test_multiple_of_three_return_fizz()
{
$fizzBuzz = new StringCalculator(6);
$result = $fizzBuzz->calculate();
$this->assertEquals('fuzz fizz', $result);
}
public function test_multiple_of_five_return_buzz()
{
$fizzBuzz = new StringCalculator(10);
$result = $fizzBuzz->calculate();
$this->assertEquals('fuzz buzz', $result);
}
public function test_multiple_of_three_and_five_return_fizz_buzz()
{
$fizzBuzz = new StringCalculator(15);
$result = $fizzBuzz->calculate();
$this->assertEquals('fizz buzz', $result);
}
public function test_multiple_of_seven_return_pop()
{
$fizzBuzz = new StringCalculator(14);
$result = $fizzBuzz->calculate();
$this->assertEquals('fuzz pop', $result);
}
public function test_multiple_of_three_and_seven_return_fizz_pop()
{
$fizzBuzz = new StringCalculator(21);
$result = $fizzBuzz->calculate();
$this->assertEquals('fizz pop', $result);
}
public function test_multiple_of_five_and_seven_return_buzz_pop()
{
$fizzBuzz = new StringCalculator(35);
$result = $fizzBuzz->calculate();
$this->assertEquals('buzz pop', $result);
}
public function test_multiple_of_three_five_and_seven_return_fizz_buzz_pop()
{
$fizzBuzz = new StringCalculator(105);
$result = $fizzBuzz->calculate();
$this->assertEquals('fizz buzz pop', $result);
}
}