mirror of
				https://github.com/furyfire/trueskill.git
				synced 2025-11-04 10:12:28 +01:00 
			
		
		
		
	Cleanup abstractions of "TestCase" class in unittest
	
		
			
	
		
	
	
		
	
		
			All checks were successful
		
		
	
	
		
			
				
	
				ci/woodpecker/push/woodpecker Pipeline was successful
				
			
		
		
	
	
				
					
				
			
		
			All checks were successful
		
		
	
	ci/woodpecker/push/woodpecker Pipeline was successful
				
			This commit is contained in:
		
							
								
								
									
										22
									
								
								tests/FactorGraphs/VariableTest.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										22
									
								
								tests/FactorGraphs/VariableTest.php
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,22 @@
 | 
			
		||||
<?php
 | 
			
		||||
 | 
			
		||||
namespace DNW\Skills\Tests\FactorGraphs;
 | 
			
		||||
 | 
			
		||||
use DNW\Skills\FactorGraphs\Variable;
 | 
			
		||||
use DNW\Skills\Numerics\GaussianDistribution;
 | 
			
		||||
use PHPUnit\Framework\TestCase;
 | 
			
		||||
 | 
			
		||||
class VariableTest extends TestCase
 | 
			
		||||
{
 | 
			
		||||
    public function test(): void
 | 
			
		||||
    {
 | 
			
		||||
        $gd_prior = new GaussianDistribution();
 | 
			
		||||
        $var = new Variable('dummy', $gd_prior);
 | 
			
		||||
        $this->assertEquals($gd_prior, $var->getValue());
 | 
			
		||||
        $gd_new = new GaussianDistribution();
 | 
			
		||||
        $this->assertEquals($gd_new, $var->getValue());
 | 
			
		||||
        $var->resetToPrior();
 | 
			
		||||
        $this->assertEquals($gd_prior, $var->getValue());
 | 
			
		||||
        $this->assertEquals('Variable[dummy]', (string)$var);
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user