mirror of
https://github.com/furyfire/trueskill.git
synced 2025-03-19 00:08:37 +00:00
Unittesting
This commit is contained in:
@ -10,7 +10,7 @@ use PHPUnit\Framework\TestCase;
|
||||
|
||||
class ScheduleStepTest extends TestCase
|
||||
{
|
||||
public function test(): void
|
||||
public function testtoStringInterface(): void
|
||||
{
|
||||
$stub = $this->createStub(Factor::class);
|
||||
$ss = new ScheduleStep('dummy', $stub, 0);
|
||||
|
@ -10,7 +10,7 @@ use PHPUnit\Framework\TestCase;
|
||||
|
||||
class VariableTest extends TestCase
|
||||
{
|
||||
public function test(): void
|
||||
public function testGetterSetter(): void
|
||||
{
|
||||
$gd_prior = new GaussianDistribution();
|
||||
$var = new Variable('dummy', $gd_prior);
|
||||
|
@ -9,10 +9,11 @@ use PHPUnit\Framework\TestCase;
|
||||
|
||||
class PlayerTest extends TestCase
|
||||
{
|
||||
public function test(): void
|
||||
public function testPlayerObjectGetterSetter(): void
|
||||
{
|
||||
$p = new Player('dummy', 0.1, 0.2);
|
||||
$this->assertEquals('dummy', (string)$p);
|
||||
$this->assertEquals('dummy', $p->getId());
|
||||
$this->assertEquals(0.1, $p->getPartialPlayPercentage());
|
||||
$this->assertEquals(0.2, $p->getPartialUpdatePercentage());
|
||||
}
|
||||
|
@ -17,7 +17,6 @@ class TwoPlayerTrueSkillCalculatorTest extends TestCase
|
||||
{
|
||||
$calculator = new TwoPlayerTrueSkillCalculator();
|
||||
|
||||
// We only support two players
|
||||
TrueSkillCalculatorTests::testAllTwoPlayerScenarios($this, $calculator);
|
||||
}
|
||||
}
|
||||
|
@ -9,7 +9,7 @@ use PHPUnit\Framework\TestCase;
|
||||
use PHPUnit\Framework\Attributes\CoversClass;
|
||||
use PHPUnit\Framework\Attributes\CoversNothing;
|
||||
|
||||
//#[CoversClass(TwoTeamTrueSkillCalculator::class)]
|
||||
#[CoversClass(TwoTeamTrueSkillCalculator::class)]
|
||||
class TwoTeamTrueSkillCalculatorTest extends TestCase
|
||||
{
|
||||
#[CoversNothing]
|
||||
@ -17,7 +17,6 @@ class TwoTeamTrueSkillCalculatorTest extends TestCase
|
||||
{
|
||||
$calculator = new TwoTeamTrueSkillCalculator();
|
||||
|
||||
// We only support two players
|
||||
TrueSkillCalculatorTests::testAllTwoPlayerScenarios($this, $calculator);
|
||||
TrueSkillCalculatorTests::testAllTwoTeamScenarios($this, $calculator);
|
||||
}
|
||||
|
Reference in New Issue
Block a user