MediaWikiExtensionTest.php

Go to the documentation of this file.
00001 <?php
00013 class MediaWikiExtensionTest extends MediaWikiTestCase {
00014     public function testParsing() {
00015         $defs = __DIR__ . '/data/mediawiki-extensions.txt';
00016         $path = '%GROUPROOT%/mediawiki-extensions/extensions';
00017         $foo = new PremadeMediawikiExtensionGroups( $defs, $path );
00018         $list = $deps = $autoload = array();
00019         $foo->register( $list, $deps, $autoload );
00020 
00021         $this->assertEquals( 1, count( $deps ), 'A dependency to definition file was added' );
00022         $this->assertEquals( 2, count( $list ), 'Two group were creates' );
00023 
00024         $this->assertArrayHasKey( 'ext-exampleextension', $list );
00025         $expected = TranslateYaml::load( __DIR__ . '/data/MediaWikiExtensionTest-conf1.yaml' );
00026         $this->assertEquals( $expected, $list['ext-exampleextension']->getConfiguration() );
00027 
00028         $this->assertArrayHasKey( 'ext-wikimediamessages', $list );
00029         $expected = TranslateYaml::load( __DIR__ . '/data/MediaWikiExtensionTest-conf2.yaml' );
00030         $this->assertEquals( $expected, $list['ext-wikimediamessages']->getConfiguration() );
00031     }
00032 }
Generated on Tue Oct 29 00:00:24 2013 for MediaWiki Translate Extension by  doxygen 1.6.3