Merge "objectcache: Add @covers for BagOStuffTest"
[lhc/web/wiklou.git] / tests / phpunit / includes / StatusTest.php
index 44463cf..c013f4f 100644 (file)
@@ -56,6 +56,17 @@ class StatusTest extends MediaWikiLangTestCase {
                $this->assertEquals( $message, $status->getMessage()->getKey() );
        }
 
+       /**
+        *
+        */
+       public function testOkAndErrors() {
+               $status = Status::newGood( 'foo' );
+               $this->assertTrue( $status->ok );
+               $status = Status::newFatal( 'foo', 1, 2 );
+               $this->assertFalse( $status->ok );
+               $this->assertArrayEquals( array( array( 'type' => 'error', 'message' => 'foo', 'params' => array( 1, 2 ) ) ), $status->errors );
+       }
+
        /**
         * @dataProvider provideSetResult
         * @covers Status::setResult