X-Git-Url: https://git.cyclocoop.org/?a=blobdiff_plain;f=tests%2Fphpunit%2Fincludes%2FFormOptionsTest.php;h=e491d610c10c94f7959fb690ab60e8ca128e18ad;hb=939199bcea28a3b13c49c0f808d11d415660b924;hp=5c4d1c05d7d5f03ac4ab3ce4de31eb22f2a0a8e3;hpb=57eaa2bf04ce1b48bd89c10defe4de5b7d31f047;p=lhc%2Fweb%2Fwiklou.git diff --git a/tests/phpunit/includes/FormOptionsTest.php b/tests/phpunit/includes/FormOptionsTest.php index 5c4d1c05d7..e491d610c1 100644 --- a/tests/phpunit/includes/FormOptionsTest.php +++ b/tests/phpunit/includes/FormOptionsTest.php @@ -52,6 +52,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 +87,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