Changeset 1160 in tests for trunk/tests/user/capabilities.php
- Timestamp:
- 11/29/2012 04:04:21 PM (14 years ago)
- File:
-
- 1 edited
-
trunk/tests/user/capabilities.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/user/capabilities.php
r1159 r1160 561 561 $cap = get_post_type_object( 'foobar' )->cap; 562 562 563 $this->assertEquals( 'edit_foobars', $cap->create_posts ); 564 563 565 $this->assertFalse($admin->has_cap( $cap->create_posts )); 564 566 $this->assertFalse($author->has_cap( $cap->create_posts )); … … 577 579 578 580 _unregister_post_type( 'foobar' ); 581 582 $cap = get_post_type_object( 'attachment' )->cap; 583 $this->assertEquals( 'upload_files', $cap->create_posts ); 584 $this->assertEquals( 'edit_posts', $cap->edit_posts ); 585 586 $this->assertTrue( $author->has_cap( $cap->create_posts ) ); 587 $this->assertTrue( $author->has_cap( $cap->edit_posts ) ); 588 $this->assertTrue( $contributor->has_cap( $cap->edit_posts ) ); 589 $this->assertFalse( $contributor->has_cap( $cap->create_posts ) ); 579 590 } 580 591
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)