|
@@ 77-90 (lines=14) @@
|
| 74 |
|
$this->assertTrue(isset($perms["EDIT_CONTENT_REVIEW_FIELDS"])); |
| 75 |
|
} |
| 76 |
|
|
| 77 |
|
public function testUserWithPermissionCanEdit() |
| 78 |
|
{ |
| 79 |
|
/** @var Member $editor */ |
| 80 |
|
$editor = $this->objFromFixture(Member::class, "editor"); |
| 81 |
|
|
| 82 |
|
$this->logInAs($editor); |
| 83 |
|
|
| 84 |
|
/** @var Page|SiteTreeContentReview $page */ |
| 85 |
|
$page = new Page(); |
| 86 |
|
|
| 87 |
|
$fields = $page->getSettingsFields(); |
| 88 |
|
|
| 89 |
|
$this->assertNotNull($fields->dataFieldByName("NextReviewDate")); |
| 90 |
|
} |
| 91 |
|
|
| 92 |
|
public function testUserWithoutPermissionCannotEdit() |
| 93 |
|
{ |
|
@@ 92-105 (lines=14) @@
|
| 89 |
|
$this->assertNotNull($fields->dataFieldByName("NextReviewDate")); |
| 90 |
|
} |
| 91 |
|
|
| 92 |
|
public function testUserWithoutPermissionCannotEdit() |
| 93 |
|
{ |
| 94 |
|
/** @var Member $author */ |
| 95 |
|
$author = $this->objFromFixture(Member::class, "author"); |
| 96 |
|
|
| 97 |
|
$this->logInAs($author); |
| 98 |
|
|
| 99 |
|
/** @var Page|SiteTreeContentReview $page */ |
| 100 |
|
$page = new Page(); |
| 101 |
|
|
| 102 |
|
$fields = $page->getSettingsFields(); |
| 103 |
|
|
| 104 |
|
$this->assertNull($fields->dataFieldByName("NextReviewDate")); |
| 105 |
|
} |
| 106 |
|
|
| 107 |
|
public function testAutomaticallyToNotSetReviewDate() |
| 108 |
|
{ |