Merge "Improve test coverage metrics"

This commit is contained in:
jenkins-bot 2021-02-22 17:00:23 +00:00 committed by Gerrit Code Review
commit 63a9c86607
3 changed files with 4 additions and 0 deletions

View file

@ -92,7 +92,9 @@ class EditStashCache {
*/
private function logCache( string $type, string $key ) : void {
if ( !in_array( $type, [ 'store', 'hit', 'miss' ] ) ) {
// @codeCoverageIgnoreStart
throw new InvalidArgumentException( '$type must be either "store", "hit" or "miss"' );
// @codeCoverageIgnoreEnd
}
$this->logger->debug(
__METHOD__ . ": cache {logtype} for '{target}' (key {key}).",

View file

@ -16,6 +16,7 @@ use TitleValue;
/**
* @coversDefaultClass \MediaWiki\Extension\AbuseFilter\EditStashCache
* @covers ::__construct
*/
class EditStashCacheTest extends MediaWikiUnitTestCase {

View file

@ -161,6 +161,7 @@ class EmergencyWatcherTest extends MediaWikiUnitTestCase {
/**
* @covers ::getFiltersToThrottle
* @covers ::getEmergencyValue
* @dataProvider provideFiltersToThrottle
*/
public function testGetFiltersToThrottle(