MediaWiki  1.23.2
Go to the documentation of this file.
1 <?php
11  public function testWfIsBadImage( $name, $title, $blacklist, $expected, $desc ) {
12  $this->assertEquals( $expected, wfIsBadImage( $name, $title, $blacklist ), $desc );
13  }
15  public static function provideWfIsBadImageList() {
16  $blacklist = '* [[File:Bad.jpg]] except [[Nasty page]]';
18  return array(
19  array( 'Bad.jpg', false, $blacklist, true,
20  'Called on a bad image' ),
21  array( 'Bad.jpg', Title::makeTitle( NS_MAIN, 'A page' ), $blacklist, true,
22  'Called on a bad image' ),
23  array( 'NotBad.jpg', false, $blacklist, false,
24  'Called on a non-bad image' ),
25  array( 'Bad.jpg', Title::makeTitle( NS_MAIN, 'Nasty page' ), $blacklist, false,
26  'Called on a bad image but is on a whitelisted page' ),
27  array( 'File:Bad.jpg', false, $blacklist, false,
28  'Called on a bad image with File:' ),
29  );
30  }
31 }
static & makeTitle( $ns, $title, $fragment='', $interwiki='')
Create a new Title from a namespace index and a DB key.
Definition: Title.php:398
skin txt MediaWiki includes four core it has been set as the default in MediaWiki since the replacing Monobook it had been been the default skin since before being replaced by Vector largely rewritten in while keeping its appearance Several legacy skins were removed in the as the burden of supporting them became too heavy to bear Those in etc for skin dependent CSS etc for skin dependent JavaScript These can also be customised on a per user by etc This feature has led to a wide variety of user styles becoming that gallery is a good place to ending in php
Definition: skin.txt:62
const NS_MAIN
Definition: Defines.php:79
Definition: MediaWikiTestCase.php:6
the array() calling protocol came about after MediaWiki 1.4rc1.
List of Api Query prop modules.
wfIsBadImage( $name, $contextTitle=false, $blacklist=null)
Determine if an image exists on the 'bad image list'.
Definition: GlobalFunctions.php:4055
presenting them properly to the user as errors is done by the caller $title
Definition: hooks.txt:1324
Allows to change the fields on the form that will be generated $name
Definition: hooks.txt:336
testWfIsBadImage( $name, $title, $blacklist, $expected, $desc)
@dataProvider provideWfIsBadImageList @covers wfIsBadImage
Definition: GlobalWithDBTest.php:11
static provideWfIsBadImageList()
Definition: GlobalWithDBTest.php:15
@group Database
Definition: GlobalWithDBTest.php:6