- [ 'Bad.jpg', false, $blacklist, true,
- 'Called on a bad image' ],
- [ 'Bad.jpg', Title::makeTitle( NS_MAIN, 'A page' ), $blacklist, true,
- 'Called on a bad image' ],
- [ 'NotBad.jpg', false, $blacklist, false,
- 'Called on a non-bad image' ],
- [ 'Bad.jpg', Title::makeTitle( NS_MAIN, 'Nasty page' ), $blacklist, false,
- 'Called on a bad image but is on a whitelisted page' ],
- [ 'File:Bad.jpg', false, $blacklist, false,
- 'Called on a bad image with File:' ],
+ 'No context page' => [ 'Bad.jpg', null, true ],
+ 'Context page not whitelisted' =>
+ [ 'Bad.jpg', Title::makeTitleSafe( NS_MAIN, 'A page' ), true ],
+ 'Good image' => [ 'Good.jpg', null, false ],
+ 'Whitelisted context page' =>
+ [ 'Bad.jpg', Title::makeTitleSafe( NS_MAIN, 'Nasty page' ), false ],
+ 'Bad image with Image:' => [ 'Image:Bad.jpg', null, false ],
+ 'Bad image with File:' => [ 'File:Bad.jpg', null, false ],
+ 'Bad image with Image: in blacklist' => [ 'Bad2.jpg', null, true ],
+ 'Bad image without prefix in blacklist' => [ 'Bad3.jpg', null, true ],
+ 'Bad image with different namespace in blacklist' => [ 'Bad4.jpg', null, true ],
+ 'Redirect to bad image' => [ 'Redirect to bad.jpg', null, true ],
+ 'Redirect to good image' => [ 'Redirect_to_good.jpg', null, false ],
+ 'Hook says bad (with space)' => [ 'Hook bad.jpg', null, true ],
+ 'Hook says bad (with underscore)' => [ 'Hook_bad.jpg', null, true ],
+ 'Hook says good' => [ 'Hook good.jpg', null, false ],
+ 'Redirect to hook bad image' => [ 'Redirect to hook bad.jpg', null, true ],
+ 'Redirect to hook good image' => [ 'Redirect to hook good.jpg', null, false ],
+ 'Malformed title doesn\'t break the line' => [ 'Bad5.jpg', null, true ],