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->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