public function testLabourCoOpPositionCalc() { $positions = $this->getAllPositions('calculateAllPolicyPositions', 'Labour'); $expectedResults = array('810' => array('policy_id' => 810, 'position' => 'voted a mixture of for and against', 'score' => 0.5, 'desc' => 'greater <b>regulation of gambling</b>')); $this->assertEquals($expectedResults, $positions); $party = new MySociety\TheyWorkForYou\Party('Labour/Co-operative'); $party->cache_position($positions['810']); $position = $party->policy_position(810); $expected = 'voted a mixture of for and against'; $this->assertEquals($expected, $position); }