Changeset 48121 for trunk/tests/phpunit/tests/comment/wpBlacklistCheck.php
- Timestamp:
- 06/22/2020 05:24:34 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/comment/wpBlacklistCheck.php
r46586 r48121 4 4 * @group comment 5 5 */ 6 class Tests_WP_Bl acklist_Check extends WP_UnitTestCase {6 class Tests_WP_Blocklist_Check extends WP_UnitTestCase { 7 7 8 public function test_should_return_true_when_content_matches_bl acklist_keys() {8 public function test_should_return_true_when_content_matches_blocklist_keys() { 9 9 $author = 'Sting'; 10 10 $author_email = 'sting@example.com'; … … 14 14 $user_agent = ''; 15 15 16 update_option( 'bl acklist_keys', "well\nfoo" );16 update_option( 'blocklist_keys', "well\nfoo" ); 17 17 18 $result = wp_bl acklist_check( $author, $author_email, $author_url, $comment, $author_ip, $user_agent );18 $result = wp_blocklist_check( $author, $author_email, $author_url, $comment, $author_ip, $user_agent ); 19 19 20 20 $this->assertTrue( $result ); … … 24 24 * @ticket 37208 25 25 */ 26 public function test_should_return_true_when_content_with_html_matches_bl acklist_keys() {26 public function test_should_return_true_when_content_with_html_matches_blocklist_keys() { 27 27 $author = 'Sting'; 28 28 $author_email = 'sting@example.com'; … … 32 32 $user_agent = ''; 33 33 34 update_option( 'bl acklist_keys', "halfway\nfoo" );34 update_option( 'blocklist_keys', "halfway\nfoo" ); 35 35 36 $result = wp_bl acklist_check( $author, $author_email, $author_url, $comment, $author_ip, $user_agent );36 $result = wp_blocklist_check( $author, $author_email, $author_url, $comment, $author_ip, $user_agent ); 37 37 38 38 $this->assertTrue( $result ); 39 39 } 40 40 41 public function test_should_return_true_when_author_matches_bl acklist_keys() {41 public function test_should_return_true_when_author_matches_blocklist_keys() { 42 42 $author = 'Sideshow Mel'; 43 43 $author_email = 'mel@example.com'; … … 47 47 $user_agent = ''; 48 48 49 update_option( 'bl acklist_keys', "sideshow\nfoo" );49 update_option( 'blocklist_keys', "sideshow\nfoo" ); 50 50 51 $result = wp_bl acklist_check( $author, $author_email, $author_url, $comment, $author_ip, $user_agent );51 $result = wp_blocklist_check( $author, $author_email, $author_url, $comment, $author_ip, $user_agent ); 52 52 53 53 $this->assertTrue( $result ); 54 54 } 55 55 56 public function test_should_return_true_when_url_matches_bl acklist_keys() {56 public function test_should_return_true_when_url_matches_blocklist_keys() { 57 57 $author = 'Rainier Wolfcastle'; 58 58 $author_email = 'rainier@wolfcastle.com'; … … 62 62 $user_agent = ''; 63 63 64 update_option( 'bl acklist_keys', "example\nfoo" );64 update_option( 'blocklist_keys', "example\nfoo" ); 65 65 66 $result = wp_bl acklist_check( $author, $author_email, $author_url, $comment, $author_ip, $user_agent );66 $result = wp_blocklist_check( $author, $author_email, $author_url, $comment, $author_ip, $user_agent ); 67 67 68 68 $this->assertTrue( $result ); … … 72 72 * @ticket 37208 73 73 */ 74 public function test_should_return_true_when_link_matches_bl acklist_keys() {74 public function test_should_return_true_when_link_matches_blocklist_keys() { 75 75 $author = 'Rainier Wolfcastle'; 76 76 $author_email = 'rainier@wolfcastle.com'; … … 80 80 $user_agent = ''; 81 81 82 update_option( 'bl acklist_keys', '/spam/' );82 update_option( 'blocklist_keys', '/spam/' ); 83 83 84 $result = wp_bl acklist_check( $author, $author_email, $author_url, $comment, $author_ip, $user_agent );84 $result = wp_blocklist_check( $author, $author_email, $author_url, $comment, $author_ip, $user_agent ); 85 85 86 86 $this->assertTrue( $result ); … … 95 95 $user_agent = ''; 96 96 97 update_option( 'bl acklist_keys', "sideshow\nfoobar" );97 update_option( 'blocklist_keys', "sideshow\nfoobar" ); 98 98 99 $result = wp_bl acklist_check( $author, $author_email, $author_url, $comment, $author_ip, $user_agent );99 $result = wp_blocklist_check( $author, $author_email, $author_url, $comment, $author_ip, $user_agent ); 100 100 101 101 $this->assertFalse( $result );
Note: See TracChangeset
for help on using the changeset viewer.