expectDeprecation(); $block = $this->createNoOpAbstractMock( AbstractBlock::class, [ 'getTarget' ] ); $block->getTarget(); } /** * @covers ::getTargetAndType */ public function testGetTargetAndType_deprecated() { $this->expectDeprecation(); $this->expectDeprecationMessageMatches( '/AbstractBlock::getTargetAndType was deprecated in MediaWiki 1.37/' ); $block = $this->createNoOpAbstractMock( AbstractBlock::class, [ 'getTargetAndType' ] ); $block->getTargetAndType(); } }