Code Duplication    Length = 11-14 lines in 2 locations

tests/ContentReviewSettingsTest.php 2 locations

@@ 57-67 (lines=11) @@
54
        $this->assertEquals(null, $page->NextReviewDate);
55
    }
56
57
    public function testAdvanceReviewFromCustomSettings()
58
    {
59
        /** @var Page|SiteTreeContentReview $page */
60
        $page = $this->objFromFixture("Page", "custom");
61
62
        $this->assertTrue($page->advanceReviewDate());
63
64
        $page->write();
65
66
        $this->assertEquals(date("Y-m-d", strtotime("now + " . $page->ReviewPeriodDays . " days")), $page->NextReviewDate);
67
    }
68
69
    public function testAdvanceReviewFromInheritedSettings()
70
    {
@@ 86-99 (lines=14) @@
83
        $this->assertEquals(date("Y-m-d", strtotime("now + 5 days")), $page->NextReviewDate);
84
    }
85
86
    public function testAdvanceReviewFromInheritedSiteConfigSettings()
87
    {
88
        /** @var Page|SiteTreeContentReview $page */
89
        $page = $this->objFromFixture("Page", "inherit");
90
91
        /** @var SiteConfig|ContentReviewDefaultSettings $siteConfig */
92
        $siteConfig = $this->objFromFixture("SiteConfig", "default");
93
94
        $this->assertTrue($page->advanceReviewDate());
95
96
        $page->write();
97
98
        $this->assertEquals(date("Y-m-d", strtotime("now + " . $siteConfig->ReviewPeriodDays . " days")), $page->NextReviewDate);
99
    }
100
101
    public function testGetSettingsObjectFromCustom()
102
    {