mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/AbuseFilter.git
synced 2024-09-23 10:18:22 +00:00
Merge "Improve test coverage metrics"
This commit is contained in:
commit
63a9c86607
|
@ -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}).",
|
||||
|
|
|
@ -16,6 +16,7 @@ use TitleValue;
|
|||
|
||||
/**
|
||||
* @coversDefaultClass \MediaWiki\Extension\AbuseFilter\EditStashCache
|
||||
* @covers ::__construct
|
||||
*/
|
||||
class EditStashCacheTest extends MediaWikiUnitTestCase {
|
||||
|
||||
|
|
|
@ -161,6 +161,7 @@ class EmergencyWatcherTest extends MediaWikiUnitTestCase {
|
|||
|
||||
/**
|
||||
* @covers ::getFiltersToThrottle
|
||||
* @covers ::getEmergencyValue
|
||||
* @dataProvider provideFiltersToThrottle
|
||||
*/
|
||||
public function testGetFiltersToThrottle(
|
||||
|
|
Loading…
Reference in a new issue