forked from jasonhett/TicTacToe
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhandlerTest.php
81 lines (63 loc) · 1.46 KB
/
handlerTest.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
76
77
78
79
80
81
<?php
require_once 'handler.php';
class handlerTest extends PHPUnit_Framework_TestCase
{
// ...
public function testPlayerPos()
{
$playerPos = get_player_pos();
$this->assertEquals(1,$playerPos);
}
public function testGetGameID(){
$game_id = get_game_id();
$this->assertEquals(1,$game_id);
}
public function testMakeNewGmae()
{
makeNewGame();
}
public function testGetPlayValue()
{
$playValue = get_play_value();
$this->assertGreaterThanOrEqual(0,$playValue);
}
public function testPlayPos()
{
$playpos = get_play_pos();
$this->assertGreaterThanOrEqual(0,$playpos);
}
public function testGetTurnCount()
{
$turnCount = get_turn_count();
$this->assertGreaterThanOrEqual(0,$turnCount);
}
public function testFirstLoad()
{
first_load();
$this->assertTrue(true);
}
public function testOutputBrowser()
{
outputToBrowser('test');
$this->assertTrue(true);
}
public function testCheckPlayerCount(){
$count = check_player_count();
$this->assertGreaterThanOrEqual(0,$count);
}
public function testWait(){
waited_for_play();
$this->assertTrue(true);
}
public function testHandleShutdown()
{
$bool = handleShutDown();
$this->assertTrue(!$bool);
}
public function testOutMsg()
{
outputMessage('test');
$this->assertTrue(true);
}
}
?>