mirror of
https://github.com/furyfire/trueskill.git
synced 2025-01-16 01:47:39 +00:00
All tests now extend TestCase
This commit is contained in:
@ -3,8 +3,9 @@
|
|||||||
use Moserware\Skills\Elo\FideEloCalculator;
|
use Moserware\Skills\Elo\FideEloCalculator;
|
||||||
use Moserware\Skills\Elo\ProvisionalFideKFactor;
|
use Moserware\Skills\Elo\ProvisionalFideKFactor;
|
||||||
use Moserware\Skills\PairwiseComparison;
|
use Moserware\Skills\PairwiseComparison;
|
||||||
|
use Moserware\Skills\Tests\TestCase;
|
||||||
|
|
||||||
class FideEloCalculatorTest extends PHPUnit_Framework_TestCase
|
class FideEloCalculatorTest extends TestCase
|
||||||
{
|
{
|
||||||
public function testFideProvisionalEloCalculator()
|
public function testFideProvisionalEloCalculator()
|
||||||
{
|
{
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
<?php namespace Moserware\Skills\Tests\Numerics;
|
<?php namespace Moserware\Skills\Tests\Numerics;
|
||||||
|
|
||||||
class BasicMathTest extends PHPUnit_Framework_TestCase
|
use Moserware\Skills\Tests\TestCase;
|
||||||
|
|
||||||
|
class BasicMathTest extends TestCase
|
||||||
{
|
{
|
||||||
public function testSquare()
|
public function testSquare()
|
||||||
{
|
{
|
||||||
|
@ -1,8 +1,10 @@
|
|||||||
<?php namespace Moserware\Skills\Tests\Numerics;
|
<?php namespace Moserware\Skills\Tests\Numerics;
|
||||||
|
|
||||||
use \PHPUnit_Framework_TestCase;
|
|
||||||
|
use Moserware\Numerics\GaussianDistribution;
|
||||||
class GaussianDistributionTest extends PHPUnit_Framework_TestCase
|
use Moserware\Skills\Tests\TestCase;
|
||||||
|
|
||||||
|
class GaussianDistributionTest extends TestCase
|
||||||
{
|
{
|
||||||
const ERROR_TOLERANCE = 0.000001;
|
const ERROR_TOLERANCE = 0.000001;
|
||||||
|
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
<?php namespace Moserware\Skills\Tests;
|
<?php namespace Moserware\Skills\Tests\Numerics;
|
||||||
|
|
||||||
use \PHPUnit_Framework_TestCase;
|
|
||||||
use Moserware\Numerics\Matrix;
|
use Moserware\Numerics\Matrix;
|
||||||
use Moserware\Numerics\IdentityMatrix;
|
use Moserware\Numerics\IdentityMatrix;
|
||||||
use Moserware\Numerics\SquareMatrix;
|
use Moserware\Numerics\SquareMatrix;
|
||||||
|
use Moserware\Skills\Tests\TestCase;
|
||||||
|
|
||||||
class MatrixTest extends PHPUnit_Framework_TestCase
|
class MatrixTest extends TestCase
|
||||||
{
|
{
|
||||||
public function testTwoByTwoDeterminant()
|
public function testTwoByTwoDeterminant()
|
||||||
{
|
{
|
||||||
|
@ -1,9 +1,8 @@
|
|||||||
<?php namespace Moserware\Skills\Tests;
|
<?php namespace Moserware\Skills\Tests;
|
||||||
|
|
||||||
use Moserware\Skills\RankSorter;
|
use Moserware\Skills\RankSorter;
|
||||||
use \PHPUnit_Framework_TestCase;
|
|
||||||
|
class RankSorterTest extends TestCase
|
||||||
class RankSorterTest extends PHPUnit_Framework_TestCase
|
|
||||||
{
|
{
|
||||||
public function testSort()
|
public function testSort()
|
||||||
{
|
{
|
||||||
@ -20,6 +19,5 @@ class RankSorterTest extends PHPUnit_Framework_TestCase
|
|||||||
$this->assertEquals($team2, $sortedRanks[0]);
|
$this->assertEquals($team2, $sortedRanks[0]);
|
||||||
$this->assertEquals($team3, $sortedRanks[1]);
|
$this->assertEquals($team3, $sortedRanks[1]);
|
||||||
$this->assertEquals($team1, $sortedRanks[2]);
|
$this->assertEquals($team1, $sortedRanks[2]);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
4
tests/TestCase.php
Normal file
4
tests/TestCase.php
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
<?php namespace Moserware\Skills\Tests;
|
||||||
|
|
||||||
|
class TestCase extends \PHPUnit_Framework_TestCase {
|
||||||
|
}
|
@ -1,8 +1,9 @@
|
|||||||
<?php namespace Moserware\Skills\Tests\TrueSkill;
|
<?php namespace Moserware\Skills\Tests\TrueSkill;
|
||||||
|
|
||||||
use \PHPUnit_Framework_TestCase;
|
use Moserware\Skills\Tests\TestCase;
|
||||||
|
use Moserware\Skills\TrueSkill\DrawMargin;
|
||||||
class DrawMarginTest extends PHPUnit_Framework_TestCase
|
|
||||||
|
class DrawMarginTest extends TestCase
|
||||||
{
|
{
|
||||||
const ERROR_TOLERANCE = 0.000001;
|
const ERROR_TOLERANCE = 0.000001;
|
||||||
|
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
<?php namespace Moserware\Skills\Tests\TrueSkill;
|
<?php namespace Moserware\Skills\Tests\TrueSkill;
|
||||||
|
|
||||||
use \PHPUnit_Framework_TestCase;
|
use Moserware\Skills\Tests\TestCase;
|
||||||
use Moserware\Skills\TrueSkill\FactorGraphTrueSkillCalculator;
|
use Moserware\Skills\TrueSkill\FactorGraphTrueSkillCalculator;
|
||||||
|
|
||||||
class FactorGraphTrueSkillCalculatorTest extends PHPUnit_Framework_TestCase
|
class FactorGraphTrueSkillCalculatorTest extends TestCase
|
||||||
{
|
{
|
||||||
public function testFactorGraphTrueSkillCalculator()
|
public function testFactorGraphTrueSkillCalculator()
|
||||||
{
|
{
|
||||||
|
@ -994,6 +994,4 @@ class TrueSkillCalculatorTests
|
|||||||
{
|
{
|
||||||
$testClass->assertEquals($expectedMatchQuality, $actualMatchQuality, '', self::ERROR_TOLERANCE_MATCH_QUALITY);
|
$testClass->assertEquals($expectedMatchQuality, $actualMatchQuality, '', self::ERROR_TOLERANCE_MATCH_QUALITY);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
|
@ -1,9 +1,9 @@
|
|||||||
<?php namespace Moserware\Skills\Tests\TrueSkill;
|
<?php namespace Moserware\Skills\Tests\TrueSkill;
|
||||||
|
|
||||||
use \PHPUnit_Framework_TestCase;
|
use Moserware\Skills\Tests\TestCase;
|
||||||
use Moserware\Skills\TrueSkill\TwoPlayerTrueSkillCalculator;
|
use Moserware\Skills\TrueSkill\TwoPlayerTrueSkillCalculator;
|
||||||
|
|
||||||
class TwoPlayerTrueSkillCalculatorTest extends PHPUnit_Framework_TestCase
|
class TwoPlayerTrueSkillCalculatorTest extends TestCase
|
||||||
{
|
{
|
||||||
public function testTwoPlayerTrueSkillCalculator()
|
public function testTwoPlayerTrueSkillCalculator()
|
||||||
{
|
{
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
<?php namespace Moserware\Skills\Tests\TrueSkill;
|
<?php namespace Moserware\Skills\Tests\TrueSkill;
|
||||||
|
|
||||||
use \PHPUnit_Framework_TestCase;
|
use Moserware\Skills\Tests\TestCase;
|
||||||
use Moserware\Skills\TrueSkill\TwoTeamTrueSkillCalculator;
|
use Moserware\Skills\TrueSkill\TwoTeamTrueSkillCalculator;
|
||||||
|
|
||||||
class TwoTeamTrueSkillCalculatorTest extends PHPUnit_Framework_TestCase
|
class TwoTeamTrueSkillCalculatorTest extends TestCase
|
||||||
{
|
{
|
||||||
public function testTwoTeamTrueSkillCalculator()
|
public function testTwoTeamTrueSkillCalculator()
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user