28 'src' => __DIR__ .
'/testSource',
43 'action' =>
'titleblacklist',
45 'tbtitle' =>
'evil_acc',
46 'tbaction' =>
'create',
47 'tbnooverride' =>
true,
52 $unlisted[0][
'titleblacklist'][
'result'],
53 'Not blacklisted title returns ok'
65 'action' =>
'titleblacklist',
67 'tbaction' =>
'create',
72 $unlisted[0][
'titleblacklist'][
'result'],
73 'Blacklisted title returns ok if the user is allowd to tboverride'
82 'action' =>
'titleblacklist',
84 'tbaction' =>
'create',
85 'tbnooverride' =>
true,
90 $listed[0][
'titleblacklist'][
'result'],
91 'Listed title returns error'
94 "The title \"bar\" has been banned from creation.\nIt matches the following " .
95 "blacklist entry: <code>[Bb]ar #example blacklist entry</code>",
96 $listed[0][
'titleblacklist'][
'reason'],
97 'Listed title error text is as expected'
101 "titleblacklist-forbidden-edit",
102 $listed[0][
'titleblacklist'][
'message'],
103 'Correct blacklist message name is returned'
107 "[Bb]ar #example blacklist entry",
108 $listed[0][
'titleblacklist'][
'line'],
109 'Correct blacklist line is returned'
118 $this->
markTestSkipped(
"This test requires the AntiSpoof extension" );
122 'action' =>
'titleblacklist',
123 'tbtitle' =>
'AVVVV',
124 'tbaction' =>
'create',
125 'tbnooverride' =>
true,
130 $listed[0][
'titleblacklist'][
'result'],
131 'Spoofed title is blacklisted'
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
Test the TitleBlacklist API.
testAntiSpoofIntegration()
Tests integration with the AntiSpoof extension.
testCheckingUnlistedTitle()
Verify we allow a title which is not blacklisted.
testCheckingBlackListedTitle()
Verify a blacklisted title gives out an error.
testTboverride()
Verify tboverride works.
doLogin( $testUser=null)
Previously this would do API requests to log in, as well as setting $wgUser and the request context's...
doApiRequest(array $params, array $session=null, $appendModule=false, User $user=null, $tokenType=null)
Does the API request and returns the result.
static destroySingleton()
Destroy/reset the current singleton instance.