diff --git a/composer.lock b/composer.lock index 866f2fb..609e1e9 100644 --- a/composer.lock +++ b/composer.lock @@ -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", diff --git a/phpmetrics.json b/phpmetrics.json index 126349b..0b47f1d 100644 --- a/phpmetrics.json +++ b/phpmetrics.json @@ -7,7 +7,8 @@ "tests" ], "report": { - "html": "output/metrics/" + "html": "output/metrics/", + "json": "output/metrics/report.json" }, "plugins": { "git": { diff --git a/phpunit.xml b/phpunit.xml index cdce282..0ab8991 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -18,6 +18,7 @@ + diff --git a/src/FactorGraphs/FactorGraph.php b/src/FactorGraphs/FactorGraph.php index 9a68f59..8698bb7 100644 --- a/src/FactorGraphs/FactorGraph.php +++ b/src/FactorGraphs/FactorGraph.php @@ -8,11 +8,6 @@ class FactorGraph { private VariableFactory $variableFactory; - public function __construct(VariableFactory $factory) - { - $this->variableFactory = $factory; - } - public function getVariableFactory(): VariableFactory { return $this->variableFactory; diff --git a/tests/GameInfoTest.php b/tests/GameInfoTest.php new file mode 100644 index 0000000..2311b88 --- /dev/null +++ b/tests/GameInfoTest.php @@ -0,0 +1,22 @@ +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()); + } +}