Tweak coverage part 2

Follow-up of Ic30883f7d261d974a2be46308d023e2714119e95, with two files
that I forgot to git-add and a repositioning of comments to avoid the
last bracket to be reported as uncovered.

Bug: T201193
Change-Id: I6bf7e5892a0f49f6a138792f0aedf230a70c18a8
This commit is contained in:
Daimona Eaytoy 2019-04-13 19:15:35 +02:00
parent 4bcb64b01a
commit 909eec6716
3 changed files with 12 additions and 4 deletions

View file

@ -119,12 +119,12 @@ class AFPData {
return new AFPData( self::DINT, intval( $orig->data ) );
} elseif ( $target === self::DSTRING ) {
return new AFPData( self::DSTRING, strval( $orig->data ) );
// We don't expose any cast-to-array method...
// @codeCoverageIgnoreStart
// We don't expose any cast-to-array method...
// @codeCoverageIgnoreStart
} elseif ( $target === self::DARRAY ) {
return new AFPData( self::DARRAY, [ $orig ] );
// @codeCoverageIgnoreEnd
}
// @codeCoverageIgnoreEnd
}
/**
@ -450,7 +450,9 @@ class AFPData {
case self::DNULL:
return null;
default:
// @codeCoverageIgnoreStart
throw new MWException( "Unknown type" );
// @codeCoverageIgnoreEnd
}
}

View file

@ -1 +1,6 @@
"foobér" rlike "^[fq]o{2}\\S.r$" & "foo" regex "^f..?.$"
"foobér" rlike "^[fq]o{2}\\S.r$" &
"foo" regex "^f..?.$" &
"UPPERCASE" irlike "uppercase" &
"lowercase" irlike "LOWERCASE" &
"1234567" irlike "12345" &
"FoObAR" irlike "^[a-z]+$"

View file

@ -36,6 +36,7 @@ use MediaWiki\Storage\NameTableAccessException;
* @covers AbuseFilter
* @covers AbuseFilterHooks
* @covers AbuseFilterPreAuthenticationProvider
* @covers AbuseFilterParser::__construct
* @todo Add upload actions everywhere
*/
class AbuseFilterConsequencesTest extends MediaWikiTestCase {