2010-09-23 22:14:56 -04:00
|
|
|
<?php
|
|
|
|
require_once 'PHPUnit/Framework.php';
|
|
|
|
require_once 'PHPUnit/TextUI/TestRunner.php';
|
|
|
|
|
|
|
|
require_once(dirname(__FILE__) . '/../../PHPSkills/TrueSkill/FactorGraphTrueSkillCalculator.php');
|
|
|
|
require_once(dirname(__FILE__) . '/TrueSkillCalculatorTests.php');
|
|
|
|
|
|
|
|
use \PHPUnit_Framework_TestCase;
|
|
|
|
use Moserware\Skills\TrueSkill\FactorGraphTrueSkillCalculator;
|
|
|
|
|
|
|
|
class FactorGraphTrueSkillCalculatorTest extends PHPUnit_Framework_TestCase
|
|
|
|
{
|
|
|
|
public function testFactorGraphTrueSkillCalculator()
|
|
|
|
{
|
|
|
|
$calculator = new FactorGraphTrueSkillCalculator();
|
2010-09-25 10:15:51 -04:00
|
|
|
|
2010-09-23 22:14:56 -04:00
|
|
|
TrueSkillCalculatorTests::testAllTwoPlayerScenarios($this, $calculator);
|
|
|
|
TrueSkillCalculatorTests::testAllTwoTeamScenarios($this, $calculator);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
$testSuite = new \PHPUnit_Framework_TestSuite();
|
2010-09-25 10:15:51 -04:00
|
|
|
$testSuite->addTest( new FactorGraphTrueSkillCalculatorTest("testFactorGraphTrueSkillCalculator"));
|
2010-09-23 22:14:56 -04:00
|
|
|
|
|
|
|
\PHPUnit_TextUI_TestRunner::run($testSuite);
|
|
|
|
?>
|