Make WordPress Core

Ticket #23192: 23192-ut.patch

File 23192-ut.patch, 767 bytes (added by bananastalktome, 12 years ago)
  • tests/ms.php

     
    1111
    1212        protected $plugin_hook_count = 0;
    1313
     14        function test_is_user_spammy() {
     15                $user_id = $this->factory->user->create( array(
     16                        'role' => 'author',
     17                        'user_login' => 'testuser1',
     18                ) );
     19
     20                $spam_username = (string) $user_id;
     21                $spam_user_id = $this->factory->user->create( array(
     22                        'role' => 'author',
     23                        'user_login' => $spam_username,
     24                ) );
     25                update_user_status( $spam_user_id, 'spam', '1' );
     26               
     27                $this->assertTrue( is_user_spammy( $spam_username ) );
     28                $this->assertFalse( is_user_spammy( 'testuser1' ) );
     29        }
     30
    1431        function test_create_and_delete_blog() {
    1532                global $wpdb;
    1633