Remove MediaWikiIntegrationTestCase::assertType

Deprecated since 1.35, not compatible with PHPUnit 8. This could've
happened earlier, but here we go.

Unused in known repos (except for the sniff looking for this usage):
https://codesearch.wmcloud.org/search/?q=assertType%5C(&i=nope&files=php&repos=

Bug: T192167
Change-Id: I479cf71d0941c35096d21686077b4d1cbc4f898d
This commit is contained in:
Daimona Eaytoy 2020-12-17 19:42:53 +01:00 committed by Jforrester
parent 2aa1aaee31
commit 6f7132cbcf
2 changed files with 2 additions and 21 deletions

View file

@ -431,6 +431,8 @@ ensure you have an updated skin.
* Html::infoBox() has been deprecated. There's no replacement.
* BagOStuff::makeKeyInternal() usage outside of BagOStuff has been deprecated.
* The global function wfAppendToArrayIfNotDefault() has been deprecated.
* MediaWikiIntegrationTestCase::assertType, hard-deprecated in 1.35 due to
incompatibility with PHPUnit 8, was removed.
* …
=== Other changes in 1.36 ===

View file

@ -2188,27 +2188,6 @@ abstract class MediaWikiIntegrationTestCase extends PHPUnit\Framework\TestCase {
}
}
/**
* Asserts the type of the provided value. This can be either
* in internal type such as boolean or integer, or a class or
* interface the value extends or implements.
*
* @deprecated since 1.35 Following the PHPUnit deprecation of assertInternalType
*
* @param string $type
* @param mixed $actual
* @param string $message
*/
protected function assertType( $type, $actual, $message = '' ) {
wfDeprecated( __METHOD__, '1.35' );
if ( class_exists( $type ) || interface_exists( $type ) ) {
$this->assertInstanceOf( $type, $actual, $message );
} else {
// phpcs:ignore MediaWiki.Usage.PHPUnitDeprecatedMethods.AssertInternalTypeGeneric
$this->assertInternalType( $type, $actual, $message );
}
}
/**
* Returns true if the given namespace defaults to Wikitext
* according to $wgNamespaceContentModels