Ticket #19265: 19265.tests.diff
| File 19265.tests.diff, 809 bytes (added by duck_, 19 months ago) |
|---|
-
wp-testcase/test_user.php
210 210 $this->assertEquals( $user->ID, $user->id ); 211 211 } 212 212 213 /** 214 * @ticket 19265 215 */ 216 function test_user_level_property_back_compat() { 217 $roles = array( 218 'administrator' => 10, 219 'editor' => 7, 220 'author' => 2, 221 'contributor' => 1, 222 'subscriber' => 0, 223 ); 224 225 foreach ( $roles as $role => $level ) { 226 $user_id = $this->_make_user( $role ); 227 $user = new WP_User( $user_id ); 228 229 $this->assertTrue( isset( $user->user_level ) ); 230 $this->assertEquals( $level, $user->user_level ); 231 } 232 } 233 213 234 function test_construction() { 214 235 $user_id = $this->_make_user('author'); 215 236
