Re-enable MediaWiki.WhiteSpace.SpaceAfterControlStructure.Incorrect
[lhc/web/wiklou.git] / tests / phpunit / includes / libs / RunningStatTest.php
index e24c088..35a8e4f 100644 (file)
@@ -3,7 +3,7 @@
  * PHP Unit tests for RunningStat class.
  * @covers RunningStat
  */
-class RunningStatTest extends MediaWikiTestCase {
+class RunningStatTest extends PHPUnit_Framework_TestCase {
 
        public $points = array(
                49.7168, 74.3804,  7.0115, 96.5769, 34.9458,
@@ -23,7 +23,7 @@ class RunningStatTest extends MediaWikiTestCase {
         */
        public function testRunningStatAccuracy() {
                $rstat = new RunningStat();
-               foreach( $this->points as $point ) {
+               foreach ( $this->points as $point ) {
                        $rstat->push( $point );
                }
 
@@ -32,8 +32,6 @@ class RunningStatTest extends MediaWikiTestCase {
                        return pow( $mean - $x, 2 );
                }, $this->points ) ) / ( count( $rstat ) - 1 );
                $stddev = sqrt( $variance );
-               $min = min( $this->points );
-               $max = max( $this->points );
 
                $this->assertEquals( count( $rstat ), count( $this->points ) );
                $this->assertEquals( $rstat->min, min( $this->points ) );
@@ -53,7 +51,7 @@ class RunningStatTest extends MediaWikiTestCase {
        public function testRunningStatMerge() {
                $expected = new RunningStat();
 
-               foreach( $this->points as $point ) {
+               foreach ( $this->points as $point ) {
                        $expected->push( $point );
                }
 
@@ -62,13 +60,13 @@ class RunningStatTest extends MediaWikiTestCase {
 
                // Accumulate the first half into one RunningStat object
                $first = new RunningStat();
-               foreach( $sets[0] as $point ) {
+               foreach ( $sets[0] as $point ) {
                        $first->push( $point );
                }
 
                // Accumulate the second half into another RunningStat object
                $second = new RunningStat();
-               foreach( $sets[1] as $point ) {
+               foreach ( $sets[1] as $point ) {
                        $second->push( $point );
                }