/** * Tests if the pairings array returns * the correct pairings count. */ public function testPairingsCorrectArrayReturned() { $tournamentID = 1; $fakePlayers = [0 => getFakePlayers(11)]; $expectedPairingsCount = 6; \Swiss::shouldReceive('roundsCount')->with($tournamentID)->once()->andReturn(1); $result = $this->pairingsHandler->ranked($fakePlayers, $tournamentID); $this->assertCount(6, $result); }