2024-02-05 13:29:57 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
|
|
namespace DNW\Skills\Tests;
|
|
|
|
|
|
|
|
use DNW\Skills\GameInfo;
|
2024-05-14 09:41:17 +00:00
|
|
|
use DNW\Skills\Rating;
|
2024-02-05 13:29:57 +00:00
|
|
|
use PHPUnit\Framework\TestCase;
|
2024-05-14 08:46:43 +00:00
|
|
|
use PHPUnit\Framework\Attributes\CoversClass;
|
|
|
|
use PHPUnit\Framework\Attributes\UsesClass;
|
2024-02-05 13:29:57 +00:00
|
|
|
|
2024-05-14 08:46:43 +00:00
|
|
|
#[CoversClass(GameInfo::class)]
|
|
|
|
#[UsesClass(Rating::class)]
|
2024-02-05 13:29:57 +00:00
|
|
|
class GameInfoTest extends TestCase
|
|
|
|
{
|
|
|
|
public function testMembers(): void
|
|
|
|
{
|
|
|
|
$gi = new GameInfo(1, 2, 3, 4, 5);
|
|
|
|
$this->assertEquals(1, $gi->getInitialMean());
|
|
|
|
$this->assertEquals(2, $gi->getInitialStandardDeviation());
|
|
|
|
$this->assertEquals(3, $gi->getBeta());
|
|
|
|
$this->assertEquals(4, $gi->getDynamicsFactor());
|
|
|
|
$this->assertEquals(5, $gi->getDrawProbability());
|
2024-05-14 08:46:43 +00:00
|
|
|
$this->assertInstanceOf(Rating::class, $gi->getDefaultRating());
|
2024-02-05 13:29:57 +00:00
|
|
|
}
|
|
|
|
}
|