mirror of
				https://github.com/furyfire/trueskill.git
				synced 2025-10-31 08:22:30 +01: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", |             "name": "phpunit/phpunit", | ||||||
|             "version": "10.5.9", |             "version": "10.5.10", | ||||||
|             "source": { |             "source": { | ||||||
|                 "type": "git", |                 "type": "git", | ||||||
|                 "url": "https://github.com/sebastianbergmann/phpunit.git", |                 "url": "https://github.com/sebastianbergmann/phpunit.git", | ||||||
|                 "reference": "0bd663704f0165c9e76fe4f06ffa6a1ca727fdbe" |                 "reference": "50b8e314b6d0dd06521dc31d1abffa73f25f850c" | ||||||
|             }, |             }, | ||||||
|             "dist": { |             "dist": { | ||||||
|                 "type": "zip", |                 "type": "zip", | ||||||
|                 "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/0bd663704f0165c9e76fe4f06ffa6a1ca727fdbe", |                 "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/50b8e314b6d0dd06521dc31d1abffa73f25f850c", | ||||||
|                 "reference": "0bd663704f0165c9e76fe4f06ffa6a1ca727fdbe", |                 "reference": "50b8e314b6d0dd06521dc31d1abffa73f25f850c", | ||||||
|                 "shasum": "" |                 "shasum": "" | ||||||
|             }, |             }, | ||||||
|             "require": { |             "require": { | ||||||
| @@ -1671,7 +1671,7 @@ | |||||||
|             "support": { |             "support": { | ||||||
|                 "issues": "https://github.com/sebastianbergmann/phpunit/issues", |                 "issues": "https://github.com/sebastianbergmann/phpunit/issues", | ||||||
|                 "security": "https://github.com/sebastianbergmann/phpunit/security/policy", |                 "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": [ |             "funding": [ | ||||||
|                 { |                 { | ||||||
| @@ -1687,7 +1687,7 @@ | |||||||
|                     "type": "tidelift" |                     "type": "tidelift" | ||||||
|                 } |                 } | ||||||
|             ], |             ], | ||||||
|             "time": "2024-01-22T14:35:40+00:00" |             "time": "2024-02-04T09:07:51+00:00" | ||||||
|         }, |         }, | ||||||
|         { |         { | ||||||
|             "name": "psr/container", |             "name": "psr/container", | ||||||
|   | |||||||
| @@ -7,7 +7,8 @@ | |||||||
|       "tests" |       "tests" | ||||||
|     ], |     ], | ||||||
|     "report": { |     "report": { | ||||||
|       "html": "output/metrics/" |       "html": "output/metrics/", | ||||||
|  |       "json": "output/metrics/report.json" | ||||||
|     }, |     }, | ||||||
|     "plugins": { |     "plugins": { | ||||||
|       "git": { |       "git": { | ||||||
|   | |||||||
| @@ -18,6 +18,7 @@ | |||||||
|   <coverage> |   <coverage> | ||||||
|     <report> |     <report> | ||||||
|       <html outputDirectory="output/coverage" /> |       <html outputDirectory="output/coverage" /> | ||||||
|  |       <clover outputFile ="output/coverage/clover.xml" /> | ||||||
|     </report> |     </report> | ||||||
|   </coverage> |   </coverage> | ||||||
| </phpunit> | </phpunit> | ||||||
|   | |||||||
| @@ -8,11 +8,6 @@ class FactorGraph | |||||||
| { | { | ||||||
|     private VariableFactory $variableFactory; |     private VariableFactory $variableFactory; | ||||||
|  |  | ||||||
|     public function __construct(VariableFactory $factory) |  | ||||||
|     { |  | ||||||
|         $this->variableFactory = $factory; |  | ||||||
|     } |  | ||||||
|  |  | ||||||
|     public function getVariableFactory(): VariableFactory |     public function getVariableFactory(): VariableFactory | ||||||
|     { |     { | ||||||
|         return $this->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