-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFrameTest.php
54 lines (37 loc) · 938 Bytes
/
FrameTest.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
<?php
require_once 'PHPUnit/Framework.php';
require_once 'Frame.php';
class FrameTest
extends PHPUnit_Framework_TestCase
{
public function test_gutter ( )
{
$Frame = new Frame;
$this->assertEquals(
0, $Frame->ball(0)->getScore()
);
$this->assertEquals(
0, $Frame->ball(0)->getScore()
);
}
public function test_5_and_4_return_9 ( )
{
$Frame = new Frame;
$this->assertEquals(
5, $Frame->ball(5)->getScore()
);
$this->assertEquals(
9,
$Frame->ball(4)->getScore()
);
}
public function test_spare_returns_empty(){
}
#this test represents a test of number of
#balls remaining from a new frame
public function test_balls_remaining(){
$Frame = new Frame;
$this->assertEquals(
2, $Frame->getBallsRemaining());
}
}