Allow to optionally set language in Message constructor
authoraude <aude.wiki@gmail.com>
Wed, 26 Mar 2014 17:36:36 +0000 (18:36 +0100)
committeraude <aude.wiki@gmail.com>
Fri, 28 Mar 2014 16:59:48 +0000 (17:59 +0100)
commit3df8366e9ae939e68ebb3246ec28df438630b7e1
treea4ed58925e8b1f21b3dfbf7cc221e3e311dd80f1
parent9e413e1b354149c3bfd9e231099736ca1701d1dd
Allow to optionally set language in Message constructor

This helps with testability to not have to rely on $wgLang
and setting globals in tests.

This also provides convenience, so one does not necessarily
need to call Message::inLanguage() if language is known
at time of constructing the message object.

Also added tests to cover this change.

Change-Id: I14ee98972c7be954e04398ece9e6103f96ab60dd
includes/Message.php
tests/phpunit/includes/MessageTest.php