Code Duplication    Length = 11-14 lines in 2 locations

tests/ContentReviewSettingsTest.php 2 locations

@@ 74-84 (lines=11) @@
71
        $this->assertEquals(null, $page->NextReviewDate);
72
    }
73
74
    public function testAdvanceReviewFromCustomSettings()
75
    {
76
        /** @var Page|SiteTreeContentReview $page */
77
        $page = $this->objFromFixture(Page::class, "custom");
78
79
        $this->assertTrue($page->advanceReviewDate());
80
81
        $page->write();
82
83
        $this->assertEquals(date('Y-m-d', strtotime("now + " . $page->ReviewPeriodDays . " days")), $page->NextReviewDate);
84
    }
85
86
    public function testAdvanceReviewFromInheritedSettings()
87
    {
@@ 103-116 (lines=14) @@
100
        $this->assertEquals(date('Y-m-d', strtotime("now + 5 days")), $page->NextReviewDate);
101
    }
102
103
    public function testAdvanceReviewFromInheritedSiteConfigSettings()
104
    {
105
        /** @var Page|SiteTreeContentReview $page */
106
        $page = $this->objFromFixture(Page::class, "inherit");
107
108
        /** @var SiteConfig|ContentReviewDefaultSettings $siteConfig */
109
        $siteConfig = $this->objFromFixture(SiteConfig::class, "default");
110
111
        $this->assertTrue($page->advanceReviewDate());
112
113
        $page->write();
114
115
        $this->assertEquals(date('Y-m-d', strtotime("now + " . $siteConfig->ReviewPeriodDays . " days")), $page->NextReviewDate);
116
    }
117
118
    public function testGetSettingsObjectFromCustom()
119
    {