mirror of
https://github.com/furyfire/trueskill.git
synced 2025-01-15 17:37:39 +00:00
More testing and reporting
This commit is contained in:
12
composer.lock
generated
12
composer.lock
generated
@ -1590,16 +1590,16 @@
|
||||
},
|
||||
{
|
||||
"name": "phpunit/phpunit",
|
||||
"version": "10.5.9",
|
||||
"version": "10.5.10",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/phpunit.git",
|
||||
"reference": "0bd663704f0165c9e76fe4f06ffa6a1ca727fdbe"
|
||||
"reference": "50b8e314b6d0dd06521dc31d1abffa73f25f850c"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/0bd663704f0165c9e76fe4f06ffa6a1ca727fdbe",
|
||||
"reference": "0bd663704f0165c9e76fe4f06ffa6a1ca727fdbe",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/50b8e314b6d0dd06521dc31d1abffa73f25f850c",
|
||||
"reference": "50b8e314b6d0dd06521dc31d1abffa73f25f850c",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -1671,7 +1671,7 @@
|
||||
"support": {
|
||||
"issues": "https://github.com/sebastianbergmann/phpunit/issues",
|
||||
"security": "https://github.com/sebastianbergmann/phpunit/security/policy",
|
||||
"source": "https://github.com/sebastianbergmann/phpunit/tree/10.5.9"
|
||||
"source": "https://github.com/sebastianbergmann/phpunit/tree/10.5.10"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@ -1687,7 +1687,7 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2024-01-22T14:35:40+00:00"
|
||||
"time": "2024-02-04T09:07:51+00:00"
|
||||
},
|
||||
{
|
||||
"name": "psr/container",
|
||||
|
@ -7,7 +7,8 @@
|
||||
"tests"
|
||||
],
|
||||
"report": {
|
||||
"html": "output/metrics/"
|
||||
"html": "output/metrics/",
|
||||
"json": "output/metrics/report.json"
|
||||
},
|
||||
"plugins": {
|
||||
"git": {
|
||||
|
@ -18,6 +18,7 @@
|
||||
<coverage>
|
||||
<report>
|
||||
<html outputDirectory="output/coverage" />
|
||||
<clover outputFile ="output/coverage/clover.xml" />
|
||||
</report>
|
||||
</coverage>
|
||||
</phpunit>
|
||||
|
@ -8,11 +8,6 @@ class FactorGraph
|
||||
{
|
||||
private VariableFactory $variableFactory;
|
||||
|
||||
public function __construct(VariableFactory $factory)
|
||||
{
|
||||
$this->variableFactory = $factory;
|
||||
}
|
||||
|
||||
public function getVariableFactory(): VariableFactory
|
||||
{
|
||||
return $this->variableFactory;
|
||||
|
22
tests/GameInfoTest.php
Normal file
22
tests/GameInfoTest.php
Normal file
@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace DNW\Skills\Tests;
|
||||
|
||||
use DNW\Skills\GameInfo;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
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());
|
||||
$this->assertInstanceOf(\DNW\Skills\Rating::class, $gi->getDefaultRating());
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user