<?php
+use Wikimedia\TestingAccessWrapper;
+
/**
* Checks that all API modules, core and extensions, have documentation i18n messages
*
RequestContext::getMain()->getConfig(),
] ) );
foreach ( $globals as $k => $v ) {
- $this->setMWGlobals( "wg$k", $v );
+ $this->setMwGlobals( "wg$k", $v );
}
// Fetch module.
}
// Module description messages.
- $this->checkMessage( $module->getDescriptionMessage(), 'Module description' );
+ $this->checkMessage( $module->getSummaryMessage(), 'Module summary' );
+ $this->checkMessage( $module->getExtendedDescription(), 'Module help top text' );
// Parameters. Lots of messages in here.
$params = $module->getFinalParams( ApiBase::GET_VALUES_FOR_HELP );
// Messages for examples.
foreach ( $module->getExamplesMessages() as $qs => $msg ) {
+ $this->assertStringStartsNotWith( 'api.php?', $qs,
+ "Query string must not begin with 'api.php?'" );
$this->checkMessage( $msg, "Example $qs" );
}
}