MediaWikiInsertablesSuggesterTest.php
Go to the documentation of this file.00001 <?php
00010 class MediaWikiInsertablesSuggesterTest extends MediaWikiTestCase {
00011
00015 public function testGetInsertables( $input, $expected ) {
00016 $suggester = new MediaWikiInsertablesSuggester();
00017 $this->assertEquals( $expected, $suggester->getInsertables( $input ) );
00018 }
00019
00020 public function getInsertablesProvider() {
00021 return array(
00022 array( 'Hi $1', array(
00023 new Insertable( '$1', '$1', '' )
00024 ) ),
00025 array( '{{GENDER:$1|he|she}}', array(
00026 new Insertable( '$1', '$1', '' ),
00027 new Insertable( 'GENDER:$1', '{{GENDER:$1|', '}}' ),
00028 ) ),
00029 );
00030 }
00031 }