Passed
Branch master (9bf083)
by Michael
03:59
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
<?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(), -1);
16
    }
17
}
18