MediaWiki REL1_33
BaseBlacklistTest.php
Go to the documentation of this file.
1<?php
2
26
30 public static function provideGetTypeFromTitle() {
31 return [
32 [ 'MediaWiki:Spam-blacklist', 'spam' ],
33 [ 'MediaWiki:Spam-whitelist', 'spam' ],
34 [ 'MediaWiki:Email-whitelist', 'email' ],
35 [ 'MediaWiki:Email-blacklist', 'email' ],
36 [ 'MediaWiki:A random page', false ],
37 [ 'Another random page', false ],
38 ];
39 }
40
46 public function testGetTypeFromTitle( $title, $expected ) {
47 $title = Title::newFromText( $title );
49 $this->assertEquals( $expected, $output );
50 }
51}
and that you know you can do these things To protect your we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights These restrictions translate to certain responsibilities for you if you distribute copies of the or if you modify it For if you distribute copies of such a whether gratis or for a you must give the recipients all the rights that you have You must make sure that receive or can get the source code And you must show them these terms so they know their rights We protect your rights with two and(2) offer you this license which gives you legal permission to copy
testGetTypeFromTitle( $title, $expected)
provideGetTypeFromTitle
static getTypeFromTitle(Title $title)
Returns the type of blacklist from the given title.
static configuration should be added through ResourceLoaderGetConfigVars instead can be used to get the real title e g db for database replication lag or jobqueue for job queue size converted to pseudo seconds It is possible to add more fields and they will be returned to the user in the API response after the basic globals have been set but before ordinary actions take place $output
Definition hooks.txt:2272
processing should stop and the error should be shown to the user * false
Definition hooks.txt:187