Skip to:
Content

bbPress.org

Changeset 7271

Timestamp:
06/29/2024 04:47:52 PM (6 weeks ago)
Author:
johnjamesjacoby
Message:

Common: update blacklist_keys to disallow_keys in PHPUnit tests

See: #3601

In branches/2.6, for 2.6.11.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.6/tests/phpunit/testcases/common/functions.php

    r6869 r7271  
    961961        $content        = 'Beware, they maybe bees hibernating.';
    962962
    963         update_option( 'blacklist_keys',"hibernating\nfoo" );
     963        update_option( '_keys',"hibernating\nfoo" );
    964964
    965965        $result = bbp_check_for_moderation( $anonymous_data, $author_id, $title, $content, true );
     
    967967        $this->assertFalse( $result );
    968968
    969         update_option( 'blacklist_keys',"foo\nbar" );
     969        update_option( '_keys',"foo\nbar" );
    970970
    971971        $result = bbp_check_for_moderation( $anonymous_data, $author_id, $title, $content, true );
     
    993993        $content        = bbp_get_topic_content( $t );
    994994
    995         update_option( 'blacklist_keys',"http://example.net/banned\nfoo" );
     995        update_option( '_keys',"http://example.net/banned\nfoo" );
    996996
    997997        $result = bbp_check_for_moderation( $anonymous_data, $author_id, $title, $content, true );
     
    10191019        $content        = bbp_get_topic_content( $t );
    10201020
    1021         update_option( 'blacklist_keys',"banned@example.net\nfoo" );
     1021        update_option( '_keys',"banned@example.net\nfoo" );
    10221022
    10231023        $result = bbp_check_for_moderation( $anonymous_data, $author_id, $title, $content, true );
     
    10431043        $content        = bbp_get_topic_content( $t );
    10441044
    1045         update_option( 'blacklist_keys',"127.0.0.1\nfoo" );
     1045        update_option( '_keys',"127.0.0.1\nfoo" );
    10461046
    10471047        $result = bbp_check_for_moderation( $anonymous_data, $author_id, $title, $content, true );
     
    10711071        $content        = bbp_get_topic_content( $t );
    10721072
    1073         update_option( 'blacklist_keys',"hibernating\nfoo" );
     1073        update_option( '_keys',"hibernating\nfoo" );
    10741074
    10751075        $result = bbp_check_for_moderation( $anonymous_data, $author_id, $title, $content, true );
     
    11021102        $content        = bbp_get_topic_content( $t );
    11031103
    1104         update_option( 'blacklist_keys',"hibernating\nfoo" );
     1104        update_option( '_keys',"hibernating\nfoo" );
    11051105
    11061106        $result = bbp_check_for_moderation( $anonymous_data, $author_id, $title, $content, true );
     
    11211121        $content        = 'Beware, there maybe bees <a href="http://example.com/hibernating/>buzzing</a>, buzzing.';
    11221122
    1123         update_option( 'blacklist_keys',"hibernating\nfoo" );
     1123        update_option( '_keys',"hibernating\nfoo" );
    11241124
    11251125        $result = bbp_check_for_moderation( $anonymous_data, $author_id, $title, $content, true );
     
    11451145        $content        = bbp_get_topic_content( $t );
    11461146
    1147         update_option( 'blacklist_keys',"hibernating\nfoo" );
     1147        update_option( '_keys',"hibernating\nfoo" );
    11481148
    11491149        $result = bbp_check_for_moderation( $anonymous_data, $author_id, $title, $content, true );
Note: See TracChangeset for help on using the changeset viewer.