Remove messages.inc, rebuildLanguage.php, writeMessagesArray.inc
[mediawiki.git] / tests / phpunit / includes / MWFunctionTest.php
blobf2a720e829eb47bcb099b91dfbf27faf059b8113
1 <?php
3 /**
4 * @covers MWFunction
5 */
6 class MWFunctionTest extends MediaWikiTestCase {
7 public function testNewObjFunction() {
8 $arg1 = 'Foo';
9 $arg2 = 'Bar';
10 $arg3 = array( 'Baz' );
11 $arg4 = new ExampleObject;
13 $args = array( $arg1, $arg2, $arg3, $arg4 );
15 $newObject = new MWBlankClass( $arg1, $arg2, $arg3, $arg4 );
16 $this->assertEquals(
17 MWFunction::newObj( 'MWBlankClass', $args )->args,
18 $newObject->args
23 class MWBlankClass {
25 public $args = array();
27 function __construct( $arg1, $arg2, $arg3, $arg4 ) {
28 $this->args = array( $arg1, $arg2, $arg3, $arg4 );
32 class ExampleObject {