WordPress.org

Make WordPress Core

Changeset 411 in tests


Ignore:
Timestamp:
08/05/2011 09:09:54 PM (10 years ago)
Author:
ryan
Message:

Test id property back compat

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wp-testcase/test_user.php

    r407 r411  
    182182        $this->assertEquals( 'foo', $user->data->$key );  // This will fail with WP < 3.3
    183183    }
     184
     185    function test_id_property_back_compat() {
     186        $user_id = $this->_make_user('author');
     187        $user = new WP_User( $user_id );
     188
     189        $this->assertTrue( isset( $user->id ) );
     190        $this->assertEquals( $user->ID, $user->id );
     191        $user->id = 1234;
     192        $this->assertEquals( $user->ID, $user->id );
     193    }
    184194}
    185195
Note: See TracChangeset for help on using the changeset viewer.