Completed
Push — master ( a23f84...2e53d7 )
by Michael
04:05
created

StvBallotTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 2
dl 0
loc 11
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A testRawBallotValues() 0 8 1
1
<?php
2
3
namespace Tests\Michaelc\Voting;
4
5
use Michaelc\Voting\STV\Ballot;
6
7
class StvBallotTest extends \PHPUnit_Framework_TestCase
8
{
9
	public function testRawBallotValues()
10
	{
11
		$ranking = [4, 5, 8];
12
		$ballot = new Ballot($ranking);
13
		$this->assertEquals($ballot->getRanking(), $ranking);
14
		$this->assertEquals($ballot->getWeight(), 1.0);
15
		$this->assertEquals($ballot->getLevelUsed(), 0);
16
	}
17
}
18