diff options
author | Taavi Väänänen <hi@tassu.me> | 2020-12-29 15:52:28 +0200 |
---|---|---|
committer | Taavi Väänänen <hi@tassu.me> | 2020-12-29 15:55:10 +0200 |
commit | b8d9f540284149488ff47d16ab18e4bcf3e226c6 (patch) | |
tree | 6a13b3564dd2b0c692e8b1016463ff5ea9b00c88 /tests/phpunit/includes/GlobalFunctions/GlobalWithDBTest.php | |
parent | a18815b37203f3841aa0e1d062c5ff8163d38f40 (diff) | |
download | mediawikicore-b8d9f540284149488ff47d16ab18e4bcf3e226c6.tar.gz mediawikicore-b8d9f540284149488ff47d16ab18e4bcf3e226c6.zip |
Remove hard deprecated wfIsBadImage()
Bug: T249459
Change-Id: I363ec383295aff8a2d6cc89b1f0df5369a537473
Diffstat (limited to 'tests/phpunit/includes/GlobalFunctions/GlobalWithDBTest.php')
-rw-r--r-- | tests/phpunit/includes/GlobalFunctions/GlobalWithDBTest.php | 48 |
1 files changed, 0 insertions, 48 deletions
diff --git a/tests/phpunit/includes/GlobalFunctions/GlobalWithDBTest.php b/tests/phpunit/includes/GlobalFunctions/GlobalWithDBTest.php deleted file mode 100644 index db505938117d..000000000000 --- a/tests/phpunit/includes/GlobalFunctions/GlobalWithDBTest.php +++ /dev/null @@ -1,48 +0,0 @@ -<?php - -use MediaWiki\MediaWikiServices; - -/** - * @group GlobalFunctions - * @group Database - */ -class GlobalWithDBTest extends MediaWikiIntegrationTestCase { - private function setUpBadImageTests( $name ) { - if ( in_array( $name, [ - 'Hook bad.jpg', - 'Redirect to bad.jpg', - 'Redirect_to_good.jpg', - 'Redirect to hook bad.jpg', - 'Redirect to hook good.jpg', - ] ) ) { - $this->markTestSkipped( "Didn't get RepoGroup working properly yet" ); - } - - // Don't try to fetch the files from Commons or anything, please - $this->setMwGlobals( 'wgForeignFileRepos', [] ); - - // XXX How do we get file redirects to work? - $this->editPage( 'File:Redirect to bad.jpg', '#REDIRECT [[Bad.jpg]]' ); - $this->editPage( 'File:Redirect to good.jpg', '#REDIRECT [[Good.jpg]]' ); - $this->editPage( 'File:Redirect to hook bad.jpg', '#REDIRECT [[Hook bad.jpg]]' ); - $this->editPage( 'File:Redirect to hook good.jpg', '#REDIRECT [[Hook good.jpg]]' ); - - $this->setTemporaryHook( 'BadImage', 'BadFileLookupTest::badImageHook' ); - } - - /** - * @dataProvider BadFileLookupTest::provideIsBadFile - * @covers ::wfIsBadImage - */ - public function testWfIsBadImage( $name, $title, $expected ) { - $this->setUpBadImageTests( $name ); - - $this->editPage( 'MediaWiki:Bad image list', BadFileLookupTest::BAD_FILE_LIST ); - $this->resetServices(); - // Enable messages from MediaWiki namespace - MediaWikiServices::getInstance()->getMessageCache()->enable(); - - $this->hideDeprecated( 'wfIsBadImage' ); - $this->assertEquals( $expected, wfIsBadImage( $name, $title ) ); - } -} |