Remove "Squiz.WhiteSpace.FunctionSpacing" from phpcs exclusions
[lhc/web/wiklou.git] / tests / phpunit / includes / FormOptionsTest.php
index 5c4d1c0..da08670 100644 (file)
@@ -10,7 +10,6 @@
 
 /**
  * Test class for FormOptions methods.
- * Generated by PHPUnit on 2011-02-28 at 20:46:27.
  *
  * Copyright © 2011, Antoine Musso
  *
@@ -43,16 +42,23 @@ class FormOptionsTest extends MediaWikiTestCase {
        private function assertGuessBoolean( $data ) {
                $this->guess( FormOptions::BOOL, $data );
        }
+
        private function assertGuessInt( $data ) {
                $this->guess( FormOptions::INT, $data );
        }
+
        private function assertGuessFloat( $data ) {
                $this->guess( FormOptions::FLOAT, $data );
        }
+
        private function assertGuessString( $data ) {
                $this->guess( FormOptions::STRING, $data );
        }
 
+       private function assertGuessArray( $data ) {
+               $this->guess( FormOptions::ARR, $data );
+       }
+
        /** Generic helper */
        private function guess( $expected, $data ) {
                $this->assertEquals(
@@ -60,6 +66,7 @@ class FormOptionsTest extends MediaWikiTestCase {
                        FormOptions::guessType( $data )
                );
        }
+
        /* @} */
 
        /**
@@ -84,15 +91,10 @@ class FormOptionsTest extends MediaWikiTestCase {
                $this->assertGuessString( '5' );
                $this->assertGuessString( '0' );
                $this->assertGuessString( '1.5' );
-       }
 
-       /**
-        * @expectedException MWException
-        * @covers FormOptions::guessType
-        */
-       public function testGuessTypeOnArrayThrowException() {
-               $this->object->guessType( [ 'foo' ] );
+               $this->assertGuessArray( [ 'foo' ] );
        }
+
        /**
         * @expectedException MWException
         * @covers FormOptions::guessType