Code Duplication    Length = 14-15 lines in 2 locations

tests/Reports/ElementTypeReportTest.php 1 location

@@ 40-54 (lines=15) @@
37
        );
38
    }
39
40
    public function testSourceRecords()
41
    {
42
        $records = (new ElementTypeReport)->sourceRecords();
43
44
        $this->assertInstanceOf(ArrayList::class, $records);
45
        $this->assertNotContains(BaseElement::class, $records->toArray(), 'BaseElement is excluded');
46
47
        $this->assertContainsOnlyInstancesOf(ArrayData::class, $records);
48
49
        foreach ($records as $record) {
50
            $this->assertNotNull($record->Icon);
51
            $this->assertNotNull($record->Type);
52
            $this->assertInternalType('int', $record->Total);
53
        }
54
    }
55
}
56

tests/Reports/ElementsInUseReportTest.php 1 location

@@ 41-54 (lines=14) @@
38
        $this->assertContains('Stubby Stub', $result, 'Fixtured stub element is shown');
39
    }
40
41
    public function testSourceRecords()
42
    {
43
        $records = (new ElementsInUseReport)->sourceRecords();
44
45
        $this->assertInstanceOf(ArrayList::class, $records);
46
        $this->assertNotContains(BaseElement::class, $records->toArray(), 'BaseElement is excluded');
47
48
        $this->assertContainsOnlyInstancesOf(ArrayData::class, $records);
49
50
        foreach ($records as $record) {
51
            $this->assertNotNull($record->Icon, 'Fields have an icon');
52
            $this->assertNotNull($record->Type, 'Fields have a type');
53
        }
54
    }
55
56
    public function testElementsAssociatedToPagesHaveEditLink()
57
    {