WordPress.org

Make WordPress Core

Changeset 557 in tests


Ignore:
Timestamp:
02/29/12 17:43:48 (2 years ago)
Author:
duck_
Message:

Test the $userdata global for logged out users. See #WP19769.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wp-testcase/test_user.php

    r491 r557  
    326326    } 
    327327 
     328    /** 
     329     * @ticket 19595 
     330     */ 
    328331    function test_global_userdata() { 
    329332        global $userdata, $wpdb; 
     
    339342        $this->assertTrue( isset( $userdata->$cap_key ) ); 
    340343    } 
     344 
     345    /** 
     346     * @ticket 19769 
     347     */ 
     348    function test_global_userdata_is_null_when_logged_out() { 
     349        global $userdata; 
     350        wp_set_current_user(0); 
     351        $this->assertNull( $userdata ); 
     352    } 
    341353} 
    342354 
Note: See TracChangeset for help on using the changeset viewer.