mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/AbuseFilter.git
synced 2024-11-23 13:46:48 +00:00
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:
parent
4bcb64b01a
commit
909eec6716
|
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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]+$"
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue