public function testHasMessage() {
$status = new Status();
$status->fatal( 'bad' );
+ $status->fatal( wfMessage( 'bad-msg' ) );
$this->assertTrue( $status->hasMessage( 'bad' ) );
+ $this->assertTrue( $status->hasMessage( 'bad-msg' ) );
+ $this->assertTrue( $status->hasMessage( wfMessage( 'bad-msg' ) ) );
$this->assertFalse( $status->hasMessage( 'good' ) );
}
*/
public function testGetStatusArrayWithNonObjectMessages( $nonObjMsg ) {
$status = new Status();
- if( !array_key_exists( 1, $nonObjMsg ) ) {
+ if ( !array_key_exists( 1, $nonObjMsg ) ) {
$status->warning( $nonObjMsg[0] );
} else {
$status->warning( $nonObjMsg[0], $nonObjMsg[1] );