| @@ 615-627 (lines=13) @@ | ||
| 612 | $this->assertSame($can_edit_others_post, $user_can_edit); |
|
| 613 | } |
|
| 614 | ||
| 615 | public function data_user_with_role_can_edit_own_post() |
|
| 616 | { |
|
| 617 | $data = array(); |
|
| 618 | $caps = $this->getPrimitiveCapsAndRoles(); |
|
| 619 | ||
| 620 | foreach ( self::$users as $role => $null ) { |
|
| 621 | $data[] = array( |
|
| 622 | $role, |
|
| 623 | in_array($role, $caps['edit_published_posts'], true), |
|
| 624 | ); |
|
| 625 | } |
|
| 626 | ||
| 627 | return $data; |
|
| 628 | } |
|
| 629 | ||
| 630 | public function data_user_with_role_can_edit_others_posts() |
|
| @@ 630-642 (lines=13) @@ | ||
| 627 | return $data; |
|
| 628 | } |
|
| 629 | ||
| 630 | public function data_user_with_role_can_edit_others_posts() |
|
| 631 | { |
|
| 632 | $data = array(); |
|
| 633 | $caps = $this->getPrimitiveCapsAndRoles(); |
|
| 634 | ||
| 635 | foreach ( self::$users as $role => $null ) { |
|
| 636 | $data[] = array( |
|
| 637 | $role, |
|
| 638 | in_array($role, $caps['edit_others_posts'], true), |
|
| 639 | ); |
|
| 640 | } |
|
| 641 | ||
| 642 | return $data; |
|
| 643 | } |
|
| 644 | ||
| 645 | function test_super_admin_caps() |
|