summaryrefslogtreecommitdiff
path: root/tests/phpunit/includes/GlobalFunctions/GlobalWithDBTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/phpunit/includes/GlobalFunctions/GlobalWithDBTest.php')
-rw-r--r--tests/phpunit/includes/GlobalFunctions/GlobalWithDBTest.php29
1 files changed, 0 insertions, 29 deletions
diff --git a/tests/phpunit/includes/GlobalFunctions/GlobalWithDBTest.php b/tests/phpunit/includes/GlobalFunctions/GlobalWithDBTest.php
deleted file mode 100644
index 4879a38d..00000000
--- a/tests/phpunit/includes/GlobalFunctions/GlobalWithDBTest.php
+++ /dev/null
@@ -1,29 +0,0 @@
-<?php
-
-/**
- * @group Database
- */
-class GlobalWithDBTest extends MediaWikiTestCase {
- /**
- * @dataProvider provideWfIsBadImageList
- */
- function testWfIsBadImage( $name, $title, $blacklist, $expected, $desc ) {
- $this->assertEquals( $expected, wfIsBadImage( $name, $title, $blacklist ), $desc );
- }
-
- function provideWfIsBadImageList() {
- $blacklist = '* [[File:Bad.jpg]] except [[Nasty page]]';
- return array(
- array( 'Bad.jpg', false, $blacklist, true,
- 'Called on a bad image' ),
- array( 'Bad.jpg', Title::makeTitle( NS_MAIN, 'A page' ), $blacklist, true,
- 'Called on a bad image' ),
- array( 'NotBad.jpg', false, $blacklist, false,
- 'Called on a non-bad image' ),
- array( 'Bad.jpg', Title::makeTitle( NS_MAIN, 'Nasty page' ), $blacklist, false,
- 'Called on a bad image but is on a whitelisted page' ),
- array( 'File:Bad.jpg', false, $blacklist, false,
- 'Called on a bad image with File:' ),
- );
- }
-}