Code Duplication    Length = 14-15 lines in 2 locations

tests/Reports/ElementsInUseReportTest.php 1 location

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

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