Code Duplication    Length = 12-13 lines in 2 locations

tests/Widgets/BlogArchiveWidgetTest.php 2 locations

@@ 27-39 (lines=13) @@
24
        SS_Datetime::clear_mock_now();
25
    }
26
27
    public function testArchiveMonthlyFromStage()
28
    {
29
        $widget = $this->objFromFixture('BlogArchiveWidget', 'archive-monthly');
30
        $archive = $widget->getArchive();
31
32
        $this->assertInstanceOf('SS_List', $archive);
33
        $this->assertCount(3, $archive);
34
        $this->assertDOSContains(array(
35
            array('Title' => 'August 2017'),
36
            array('Title' => 'September 2017'),
37
            array('Title' => 'May 2015'),
38
        ), $archive);
39
    }
40
41
    public function testArchiveMonthlyFromLive()
42
    {
@@ 59-70 (lines=12) @@
56
        Versioned::reading_stage($original);
57
    }
58
59
    public function testArchiveYearly()
60
    {
61
        $widget = $this->objFromFixture('BlogArchiveWidget', 'archive-yearly');
62
        $archive = $widget->getArchive();
63
64
        $this->assertInstanceOf('SS_List', $archive);
65
        $this->assertCount(2, $archive);
66
        $this->assertDOSContains(array(
67
            array('Title' => '2017'),
68
            array('Title' => '2015'),
69
        ), $archive);
70
    }
71
72
    public function testArchiveMonthlyWithNewPostsAdded()
73
    {