Code Duplication    Length = 18-20 lines in 2 locations

tests/php/SiteTreeContentReviewTest.php 2 locations

@@ 242-261 (lines=20) @@
239
        DBDatetime::clear_mock_now();
240
    }
241
242
    public function testCanBeReviewedFromInheritedSetting()
243
    {
244
        DBDatetime::set_mock_now("2013-03-01 12:00:00");
245
246
        /** @var Member $author */
247
        $author = $this->objFromFixture(Member::class, "author");
248
249
        /** @var Page|SiteTreeContentReview $parentPage */
250
        $parentPage = $this->objFromFixture(Page::class, "contact");
251
252
        $parentPage->NextReviewDate = "2013-01-01";
253
        $parentPage->write();
254
255
        /** @var Page|SiteTreeContentReview $page */
256
        $page = $this->objFromFixture(Page::class, "contact-child");
257
258
        $this->assertTrue($page->canBeReviewedBy($author));
259
260
        DBDatetime::clear_mock_now();
261
    }
262
263
    public function testUnModifiedPagesDontChangeEditor()
264
    {
@@ 315-332 (lines=18) @@
312
        DBDatetime::clear_mock_now();
313
    }
314
315
    public function testReviewActionNotVisibleForEditor()
316
    {
317
        DBDatetime::set_mock_now("2020-03-01 12:00:00");
318
319
        /** @var Page|SiteTreeContentReview $page */
320
        $page = $this->objFromFixture(Page::class, "contact");
321
322
        /** @var Member $author */
323
        $author = $this->objFromFixture(Member::class, "editor");
324
325
        $this->logInAs($author);
326
327
        $fields = $page->getCMSActions();
328
329
        $this->assertNull($fields->fieldByName("ActionMenus.ReviewContent"));
330
331
        DBDatetime::clear_mock_now();
332
    }
333
334
    public function testSiteConfigSettingsAreUsedAsDefaults()
335
    {