Cleanup in tests/: adding namespaces, removing php closing tag and general code cleanup

This commit is contained in:
Alexander Liljengård
2016-05-24 13:59:35 +02:00
parent 4ab0c5d719
commit 983c6dc487
11 changed files with 115 additions and 213 deletions

View File

@ -1,10 +1,4 @@
<?php
namespace Moserware\Skills\TrueSkill;
require_once 'PHPUnit/Framework.php';
require_once 'PHPUnit/TextUI/TestRunner.php';
require_once(dirname(__FILE__) . '/../../Skills/TrueSkill/DrawMargin.php');
<?php namespace Moserware\Skills\Tests\TrueSkill;
use \PHPUnit_Framework_TestCase;
@ -26,11 +20,4 @@ class DrawMarginTest extends PHPUnit_Framework_TestCase
$actual = DrawMargin::getDrawMarginFromDrawProbability($drawProbability, $beta);
$this->assertEquals($expected, $actual, '', DrawMarginTest::ERROR_TOLERANCE);
}
}
$testSuite = new \PHPUnit_Framework_TestSuite();
$testSuite->addTest( new DrawMarginTest( "testGetDrawMarginFromDrawProbability" ) );
\PHPUnit_TextUI_TestRunner::run($testSuite);
?>
}