Code Duplication    Length = 13-14 lines in 2 locations

tests/DQLContextResolverSpec.php 2 locations

@@ 59-71 (lines=13) @@
56
        $this::resolveAlias($qb, 'root.contestant.contest')->shouldBe('contest');
57
    }
58
59
    public function it_use_wrong_alias_from_another_entity(QueryBuilder $qb): void
60
    {
61
        $this::disableConflictProtection();
62
63
        $qb->getAllAliases()->willReturn(['contestant']);
64
        $qb->getDQLPart('join')->willReturn([
65
            'foo' => [
66
                new Join(Join::INNER_JOIN, 'foo.bar', 'contestant'),
67
            ],
68
        ]);
69
70
        $this::resolveAlias($qb, 'root.contestant')->shouldBe('contestant');
71
    }
72
73
    public function it_resolve_exists_alias(QueryBuilder $qb): void
74
    {
@@ 85-98 (lines=14) @@
82
        $this::resolveAlias($qb, 'root.contestant')->shouldBe('contestant');
83
    }
84
85
    public function it_resolve_wrong_alias_without_joining(QueryBuilder $qb): void
86
    {
87
        $this::disableConflictProtection();
88
        $this::disableAutoJoining();
89
90
        $qb->getAllAliases()->willReturn(['contestant']);
91
        $qb->getDQLPart('join')->willReturn([
92
            'foo' => [
93
                new Join(Join::INNER_JOIN, 'foo.bar', 'contestant'),
94
            ],
95
        ]);
96
97
        $this::resolveAlias($qb, 'root.contestant.contest')->shouldBe('contest');
98
    }
99
100
    public function it_join_entities(QueryBuilder $qb): void
101
    {