Fixed passing of parameter array to wfMessage()
[lhc/web/wiklou.git] / maintenance / tests / phpunit / includes / MessageTest.php
index 65c368a..22d7363 100644 (file)
@@ -34,6 +34,13 @@ class MessageTest extends PHPUnit_Framework_TestCase {
                $this->assertEquals( 'Заглавная страница', wfMessage( 'mainpage' )->inLanguage( Language::factory( 'ru' ) )->text() );
        }
 
+       function testMessagePararms() {
+               $this->assertEquals( 'Return to $1.', wfMessage( 'returnto' )->text() );
+               $this->assertEquals( 'Return to $1.', wfMessage( 'returnto', array() )->text() );
+               $this->assertEquals( 'You have foo (bar).', wfMessage( 'youhavenewmessages', 'foo', 'bar' )->text() );
+               $this->assertEquals( 'You have foo (bar).', wfMessage( 'youhavenewmessages', array( 'foo', 'bar' ) )->text() );
+       }
+
        /**
         * @expectedException MWException
         */