Index: trunk/phase3/tests/phpunit/includes/GlobalFunctions/GlobalTest.php |
— | — | @@ -934,29 +934,6 @@ |
935 | 935 | "Called eval.php --help --test with wrapper and php option" ), |
936 | 936 | ); |
937 | 937 | } |
938 | | - |
939 | | - /** |
940 | | - * @dataProvider provideWfIsBadImageList |
941 | | - */ |
942 | | - function testWfIsBadImage( $name, $title, $blacklist, $expected, $desc ) { |
943 | | - $this->assertEquals( $expected, wfIsBadImage( $name, $title, $blacklist ), $desc ); |
944 | | - } |
945 | | - |
946 | | - function provideWfIsBadImageList() { |
947 | | - $blacklist = '* [[File:Bad.jpg]] except [[Nasty page]]'; |
948 | | - return array( |
949 | | - array( 'Bad.jpg', false, $blacklist, true, |
950 | | - 'Called on a bad image' ), |
951 | | - array( 'Bad.jpg', Title::makeTitle( NS_MAIN, 'A page' ), $blacklist, true, |
952 | | - 'Called on a bad image' ), |
953 | | - array( 'NotBad.jpg', false, $blacklist, false, |
954 | | - 'Called on a non-bad image' ), |
955 | | - array( 'Bad.jpg', Title::makeTitle( NS_MAIN, 'Nasty page' ), $blacklist, false, |
956 | | - 'Called on a bad image but is on a whitelisted page' ), |
957 | | - array( 'File:Bad.jpg', false, $blacklist, false, |
958 | | - 'Called on a bad image with File:' ), |
959 | | - ); |
960 | | - } |
961 | 938 | /* TODO: many more! */ |
962 | 939 | } |
963 | 940 | |
Index: trunk/phase3/tests/phpunit/includes/GlobalFunctions/GlobalWithDBTest.php |
— | — | @@ -0,0 +1,29 @@ |
| 2 | +<?php |
| 3 | + |
| 4 | +/** |
| 5 | + * @group Database |
| 6 | + */ |
| 7 | +class GlobalWithDBTest extends MediaWikiTestCase { |
| 8 | + /** |
| 9 | + * @dataProvider provideWfIsBadImageList |
| 10 | + */ |
| 11 | + function testWfIsBadImage( $name, $title, $blacklist, $expected, $desc ) { |
| 12 | + $this->assertEquals( $expected, wfIsBadImage( $name, $title, $blacklist ), $desc ); |
| 13 | + } |
| 14 | + |
| 15 | + function provideWfIsBadImageList() { |
| 16 | + $blacklist = '* [[File:Bad.jpg]] except [[Nasty page]]'; |
| 17 | + return array( |
| 18 | + array( 'Bad.jpg', false, $blacklist, true, |
| 19 | + 'Called on a bad image' ), |
| 20 | + array( 'Bad.jpg', Title::makeTitle( NS_MAIN, 'A page' ), $blacklist, true, |
| 21 | + 'Called on a bad image' ), |
| 22 | + array( 'NotBad.jpg', false, $blacklist, false, |
| 23 | + 'Called on a non-bad image' ), |
| 24 | + array( 'Bad.jpg', Title::makeTitle( NS_MAIN, 'Nasty page' ), $blacklist, false, |
| 25 | + 'Called on a bad image but is on a whitelisted page' ), |
| 26 | + array( 'File:Bad.jpg', false, $blacklist, false, |
| 27 | + 'Called on a bad image with File:' ), |
| 28 | + ); |
| 29 | + } |
| 30 | +} |
Property changes on: trunk/phase3/tests/phpunit/includes/GlobalFunctions/GlobalWithDBTest.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 31 | + native |