Completed
Push — master ( 3a37c9...90ceec )
by Michael
04:14
created

StvCandidateTest::testNewCandidateValues()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 9
rs 9.6666
cc 1
eloc 7
nc 1
nop 0
1
<?php
2
3
namespace Tests\Michaelc\Voting;
4
5
use Michaelc\Voting\STV\Candidate;
6
7
class StvCandidateTest extends \PHPUnit_Framework_TestCase
8
{
9
	public function testNewCandidateValues()
10
	{
11
		$id = 12;
12
		$candidate = new Candidate($id);
13
		$this->assertEquals($candidate->getId(), 12);
14
		$this->assertEquals($candidate->getVotes(), 0.0);
15
		$this->assertEquals($candidate->getSurplus(), 0.0);
16
		$this->assertEquals($candidate->getState(), Candidate::RUNNING);
17
	}
18
}
19