Changeset 33379 for branches/3.7/tests/phpunit/tests/user/capabilities.php
- Timestamp:
- 07/23/2015 04:26:36 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.7/tests/phpunit/tests/user/capabilities.php
r32202 r33379 699 699 wp_set_current_user( $old_uid ); 700 700 } 701 702 function test_subscriber_cant_edit_posts() { 703 $user = new WP_User( $this->factory->user->create( array( 'role' => 'subscriber' ) ) ); 704 wp_set_current_user( $user->ID ); 705 706 $post = $this->factory->post->create( array( 'post_author' => 1 ) ); 707 708 $this->assertFalse( current_user_can( 'edit_post', $post ) ); 709 $this->assertFalse( current_user_can( 'edit_post', $post + 1 ) ); 710 } 701 711 }
Note: See TracChangeset
for help on using the changeset viewer.