Page MenuHomePhabricator

Address Voice and Tone issues in MW Core Tests
Open, Needs TriagePublic

Description

Targets
    Occurrences of '(white|black)[ \-]?list' in Directory /Users/reedy/PhpstormProjects/mediawiki/core/tests
Found Occurrences  (99 usages found)
    core  (99 usages found)
        tests  (99 usages found)
            parser  (4 usages found)
                legacyMediaParserTests.txt  (2 usages found)
                    3088 # blacklist and we'll catch selser regressions based on changes to the
                    3089 # blacklist entries for selser tests.
                ParserTestRunner.php  (1 usage found)
                    1476 # This image will be blacklisted in [[MediaWiki:Bad image list]]
                parserTests.txt  (1 usage found)
                    13611 ### For now, we are blacklisting them, and using this to test selser.
            phpunit  (87 usages found)
                includes  (74 usages found)
                    auth  (18 usages found)
                        AuthManagerTest.php  (18 usages found)
                            1570 'wgEnableDnsBlacklist' => true,
                            1571 'wgDnsBlacklistUrls' => [
                            1574 'wgProxyWhitelist' => [],
                            1580 $this->setMwGlobals( 'wgProxyWhitelist', [ '127.0.0.1' ] );
                            2604 // Session blacklisted
                            2606 $session->set( 'AuthManager::AutoCreateBlacklist', 'test' );
                            2616 [ LogLevel::DEBUG, 'blacklisted in session {sessionid}' ],
                            2621 $session->set( 'AuthManager::AutoCreateBlacklist', StatusValue::newFatal( 'test2' ) );
                            2631 [ LogLevel::DEBUG, 'blacklisted in session {sessionid}' ],
                            2649 $this->assertSame( 'noname', $session->get( 'AuthManager::AutoCreateBlacklist' ) );
                            2669 'authmanager-autocreate-noperm', $session->get( 'AuthManager::AutoCreateBlacklist' )
                            2741 StatusValue::newFatal( 'fail-in-pre' ), $session->get( 'AuthManager::AutoCreateBlacklist' )
                            2758 StatusValue::newFatal( 'fail-in-primary' ), $session->get( 'AuthManager::AutoCreateBlacklist' )
                            2775 StatusValue::newFatal( 'fail-in-secondary' ), $session->get( 'AuthManager::AutoCreateBlacklist' )
                            2795 $this->assertSame( null, $session->get( 'AuthManager::AutoCreateBlacklist' ) );
                            2815 $this->assertSame( null, $session->get( 'AuthManager::AutoCreateBlacklist' ) );
                            2840 $this->assertSame( null, $session->get( 'AuthManager::AutoCreateBlacklist' ) );
                            2869 $this->assertSame( null, $session->get( 'AuthManager::AutoCreateBlacklist' ) );
                    block  (40 usages found)
                        BlockManagerTest.php  (40 usages found)
                            34 'wgDnsBlacklistUrls' => [],
                            35 'wgEnableDnsBlacklist' => true,
                            37 'wgProxyWhitelist' => [],
                            273 * @dataProvider provideIsDnsBlacklisted
                            274 * @covers ::isDnsBlacklisted
                            275 * @covers ::inDnsBlacklist
                            277 public function testIsDnsBlacklisted( $options, $expected ) {
                            279 'wgEnableDnsBlacklist' => true,
                            280 'wgDnsBlacklistUrls' => $options['blacklist'],
                            281 'wgProxyWhitelist' => $options['whitelist'],
                            296 $blockManager->isDnsBlacklisted( $options['ip'], $options['checkWhitelist'] )
                            300 public static function provideIsDnsBlacklisted() {
                            304 'IP is blacklisted' => [
                            306 'blacklist' => [ 'dnsbl.test' ],
                            310 'whitelist' => [],
                            311 'checkWhitelist' => false,
                            315 'IP is blacklisted; blacklist has key' => [
                            317 'blacklist' => [ [ 'dnsbl.test', 'key' ] ],
                            321 'whitelist' => [],
                            322 'checkWhitelist' => false,
                            326 'IP is blacklisted; blacklist is array' => [
                            328 'blacklist' => [ [ 'dnsbl.test' ] ],
                            332 'whitelist' => [],
                            333 'checkWhitelist' => false,
                            337 'IP is not blacklisted' => [
                            339 'blacklist' => [ 'dnsbl.test' ],
                            343 'whitelist' => [],
                            344 'checkWhitelist' => false,
                            348 'Blacklist is empty' => [
                            350 'blacklist' => [],
                            354 'whitelist' => [],
                            355 'checkWhitelist' => false,
                            359 'IP is blacklisted and whitelisted; whitelist is not checked' => [
                            361 'blacklist' => [ 'dnsbl.test' ],
                            365 'whitelist' => [ '127.0.0.1' ],
                            366 'checkWhitelist' => false,
                            370 'IP is blacklisted and whitelisted; whitelist is checked' => [
                            372 'blacklist' => [ 'dnsbl.test' ],
                            376 'whitelist' => [ '127.0.0.1' ],
                            377 'checkWhitelist' => true,
                    parser  (1 usage found)
                        PreprocessorTest.php  (1 usage found)
                            114 [ "</foo>Foo<//foo>", "<root><ext><name>/foo</name><attr></attr><inner>Foo</inner><close>&lt;//foo&gt;</close></ext></root>" ], # Worth blacklisting IMHO
                    password  (1 usage found)
                        UserPasswordPolicyTest.php  (1 usage found)
                            85 'PasswordCannotMatchBlacklist' => true,
                    specials  (13 usages found)
                        SpecialMuteTest.php  (11 usages found)
                            20 'wgEnableUserEmailBlacklist' => true
                            48 public function testEmailBlacklistNotEnabled() {
                            55 'wgEnableUserEmailBlacklist' => false
                            77 public function testMuteAddsUserToEmailBlacklist() {
                            85 $this->userOptionsManager->setOption( $loggedInUser, 'email-blacklist', "999" );
                            89 $fauxRequest = new FauxRequest( [ 'wpemail-blacklist' => true ], true );
                            97 $this->userOptionsManager->getOption( $loggedInUser, 'email-blacklist' )
                            104 public function testUnmuteRemovesUserFromEmailBlacklist() {
                            112 $this->userOptionsManager->setOption( $loggedInUser, 'email-blacklist', "999\n" . $targetUser->getId() );
                            116 $fauxRequest = new FauxRequest( [ 'wpemail-blacklist' => false ], true );
                            122 $this->assertSame( "999", $this->userOptionsManager->getOption( $loggedInUser, 'email-blacklist' ) );
                        SpecialShortPagesTest.php  (2 usages found)
                            18 public function testGetQueryInfoRespectsContentNS( $contentNS, $blacklistNS, $expectedNS ) {
                            20 'wgShortPagesNamespaceBlacklist' => $blacklistNS,
                    ContentSecurityPolicyTest.php  (1 usage found)
                        19 'wgEnableImageWhitelist' => false,
                unit  (7 usages found)
                    includes  (7 usages found)
                        Permissions  (2 usages found)
                            PermissionManagerTest.php  (2 usages found)
                                35 'WhitelistRead' => false,
                                36 'WhitelistReadRegexp' => false,
                        BadFileLookupTest.php  (5 usages found)
                            177 'Context page not whitelisted' =>
                            180 'Whitelisted context page' =>
                            184 'Bad image with Image: in blacklist' => [ 'Bad2.jpg', null, true ],
                            185 'Bad image without prefix in blacklist' => [ 'Bad3.jpg', null, true ],
                            186 'Bad image with different namespace in blacklist' => [ 'Bad4.jpg', null, true ],
                MediaWikiTestCaseTrait.php  (1 usage found)
                    18 * be used to whitelist values, e.g.
                MediaWikiUnitTestCase.php  (3 usages found)
                    44 * Whitelist of globals to allow in MediaWikiUnitTestCase.
                    50 private static function getGlobalsWhitelist() {
                    80 foreach ( self::getGlobalsWhitelist() as $global ) {
                suite.xml  (2 usages found)
                    67 <whitelist addUncoveredFilesFromWhitelist="true">
                    77 </whitelist>
            qunit  (8 usages found)
                suites  (8 usages found)
                    resources  (8 usages found)
                        mediawiki  (4 usages found)
                            mediawiki.jqueryMsg.test.js  (3 usages found)
                                953 'Tag outside whitelist escaped in parse mode'
                                959 'Tag outside whitelist unchanged in text mode'
                                987 'Non-whitelisted HTML tag in external link anchor treated as text'
                            mediawiki.test.js  (1 usage found)
                                184 // Whitelist this global variable for QUnit's 'noglobal' mode
                        startup.test.js  (4 usages found)
                            3 var featureTestable, blacklisted;
                            120 blacklisted = [
                            162 QUnit.test( 'isCompatible( blacklisted )', function ( assert ) {
                            163 blacklisted.forEach( function ( ua ) {

Related Objects

StatusSubtypeAssignedTask
OpenNone
OpenNone

Event Timeline

Change 675348 had a related patch set uploaded (by Jforrester; author: Jforrester):
[mediawiki/core@master] tests: Avoid problematic language in comments and internal code

https://gerrit.wikimedia.org/r/675348

Change 675349 had a related patch set uploaded (by Jforrester; author: Jforrester):
[mediawiki/core@master] parserTests: Avoid problematic language in comments

https://gerrit.wikimedia.org/r/675349

Change 675348 merged by jenkins-bot:
[mediawiki/core@master] tests: Avoid problematic language in comments and internal code

https://gerrit.wikimedia.org/r/675348

Change 675349 merged by jenkins-bot:
[mediawiki/core@master] parserTests: Avoid problematic language in comments

https://gerrit.wikimedia.org/r/675349