getNamespaces(); $expectedOptions = ''; foreach ( $namespaces as $id => $label ) { if ( $id < 0 ) { // Don't list special namespaces continue; } if ( $id === 0 ) { $repLabel = wfMessage( 'blanknamespace' )->inLanguage( $language )->text(); } else { $repLabel = str_replace( '_', ' ', $label ); } $expectedOptions .= ""; } return $expectedOptions; } public static function provideInputHtml() { $expectedOptions = static::makeNamespaceOptionsList( MediaWikiServices::getInstance()->getContentLanguage() ); yield 'Basic list' => [ [], '', "" ]; yield 'Basic list, explicitly in userlang' => [ [ 'in-user-lang' => false ], '', "" ]; yield 'Basic list, blank all' => [ [ 'all' => '', ], '', "" ]; } public static function provideInputCodex() { $expectedOptions = static::makeNamespaceOptionsList( MediaWikiServices::getInstance()->getContentLanguage() ); yield 'Basic list' => [ [], '', false, "" ]; yield 'Basic list, explicitly in userlang' => [ [ 'in-user-lang' => false ], '', false, "" ]; yield 'Basic list, blank all' => [ [ 'all' => '', ], '', false, "" ]; } public static function provideInputOOUI() { $expectedOptions = str_replace( '"', "'", static::makeNamespaceOptionsList( MediaWikiServices::getInstance()->getContentLanguage() ) ); yield 'Basic list' => [ [], '', "
" ]; yield 'Basic list, explicitly in userlang' => [ [ 'in-user-lang' => false ], '', "
" ]; yield 'Basic list, blank all' => [ [ 'all' => '', ], '', "
" ]; } }