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'
117 if ( !class_exists(
'AntiSpoof' ) ) {
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'
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.