Code Duplication    Length = 7-8 lines in 2 locations

tests/Relations/MorphToTest.php 2 locations

@@ 21-27 (lines=7) @@
18
class MorphToTest extends AbstractTest
19
{
20
21
    public function testMorphDefaultFieldsGeneration()
22
    {
23
        $relation = new MorphTo();
24
        self::assertEquals('parent', $relation->getMorphPrefix());
25
        self::assertEquals('parent_id', $relation->getFK());
26
        self::assertEquals('parent_type', $relation->getMorphTypeField());
27
    }
28
29
    public function testMorphCustomFieldsGeneration()
30
    {
@@ 29-36 (lines=8) @@
26
        self::assertEquals('parent_type', $relation->getMorphTypeField());
27
    }
28
29
    public function testMorphCustomFieldsGeneration()
30
    {
31
        $relation = new MorphTo();
32
        $relation->addParams(['morphPrefix' => 'parent']);
33
        self::assertEquals('parent', $relation->getMorphPrefix());
34
        self::assertEquals('parent_id', $relation->getFK());
35
        self::assertEquals('parent_type', $relation->getMorphTypeField());
36
    }
37
38
    /**
39
     * @throws ModelNotLoadedInRelation