mirror of
				https://github.com/furyfire/trueskill.git
				synced 2025-11-04 10:12:28 +01:00 
			
		
		
		
	
		
			
	
	
		
			27 lines
		
	
	
		
			870 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
		
		
			
		
	
	
			27 lines
		
	
	
		
			870 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
| 
								 | 
							
								<?php
							 | 
						||
| 
								 | 
							
								require_once 'PHPUnit/Framework.php';
							 | 
						||
| 
								 | 
							
								require_once 'PHPUnit/TextUI/TestRunner.php';
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								require_once(dirname(__FILE__) . '/../../PHPSkills/TrueSkill/TwoPlayerTrueSkillCalculator.php');
							 | 
						||
| 
								 | 
							
								require_once(dirname(__FILE__) . '/TrueSkillCalculatorTests.php');
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								use \PHPUnit_Framework_TestCase;
							 | 
						||
| 
								 | 
							
								use Moserware\Skills\TrueSkill\TwoPlayerTrueSkillCalculator;
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								class TwoPlayerTrueSkillCalculatorTest extends PHPUnit_Framework_TestCase
							 | 
						||
| 
								 | 
							
								{
							 | 
						||
| 
								 | 
							
								    public function testTwoPlayerTrueSkillCalculator()
							 | 
						||
| 
								 | 
							
								    {
							 | 
						||
| 
								 | 
							
								        $calculator = new TwoPlayerTrueSkillCalculator();
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								        // We only support two players
							 | 
						||
| 
								 | 
							
								        TrueSkillCalculatorTests::testAllTwoPlayerScenarios($this, $calculator);
							 | 
						||
| 
								 | 
							
								    }
							 | 
						||
| 
								 | 
							
								}
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								$testSuite = new \PHPUnit_Framework_TestSuite();
							 | 
						||
| 
								 | 
							
								$testSuite->addTest( new TwoPlayerTrueSkillCalculatorTest("testTwoPlayerTrueSkillCalculator"));
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								\PHPUnit_TextUI_TestRunner::run($testSuite);
							 | 
						||
| 
								 | 
							
								?>
							 |