tests: Complete test coverage of HtmlArmor
[lhc/web/wiklou.git] / tests / phpunit / includes / FormOptionsTest.php
index 5c4d1c0..2ee8b98 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
  *
@@ -52,6 +51,9 @@ class FormOptionsTest extends MediaWikiTestCase {
        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 ) {
@@ -84,15 +86,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