Code Duplication    Length = 16-16 lines in 3 locations

tests/Repository/EntitySpecificationRepositorySpec.php 3 locations

@@ 137-152 (lines=16) @@
134
        $this->match($specification)->shouldReturn($this->result);
135
    }
136
137
    public function it_matches_a_single_result_without_result_modifier(
138
        Specification $specification,
139
        EntityManager $entityManager,
140
        QueryBuilder $qb,
141
        AbstractQuery $query
142
    ) {
143
        $singleResult = new \stdClass();
144
145
        $this->prepareStubs($specification, $entityManager, $qb, $query);
146
147
        $specification->modify($qb, $this->alias)->shouldBeCalled();
148
149
        $query->getSingleResult()->willReturn($singleResult);
150
151
        $this->matchSingleResult($specification)->shouldReturn($singleResult);
152
    }
153
154
    public function it_throws_exception_when_expecting_single_result_finding_none_without_result_modifier(
155
        Specification $specification,
@@ 184-199 (lines=16) @@
181
        $this->shouldThrow(NonUniqueResultException::class)->duringMatchSingleResult($specification);
182
    }
183
184
    public function it_matches_a_single_scalar_result_without_result_modifier(
185
        Specification $specification,
186
        EntityManager $entityManager,
187
        QueryBuilder $qb,
188
        AbstractQuery $query
189
    ) {
190
        $singleScalarResult = '1';
191
192
        $this->prepareStubs($specification, $entityManager, $qb, $query);
193
194
        $specification->modify($qb, $this->alias)->shouldBeCalled();
195
196
        $query->getSingleScalarResult()->willReturn($singleScalarResult);
197
198
        $this->matchSingleScalarResult($specification)->shouldReturn($singleScalarResult);
199
    }
200
201
    public function it_throws_exception_when_expecting_single_scalar_result_finding_multiple_without_result_modifier(
202
        Specification $specification,
@@ 233-248 (lines=16) @@
230
        $this->matchScalarResult($specification)->shouldReturn($scalarResult);
231
    }
232
233
    public function it_matches_a_single_result_when_expecting_one_or_null_without_result_modifier(
234
        Specification $specification,
235
        EntityManager $entityManager,
236
        QueryBuilder $qb,
237
        AbstractQuery $query
238
    ) {
239
        $singleResult = new \stdClass();
240
241
        $this->prepareStubs($specification, $entityManager, $qb, $query);
242
243
        $specification->modify($qb, $this->alias)->shouldBeCalled();
244
245
        $query->getSingleResult()->willReturn($singleResult);
246
247
        $this->matchOneOrNullResult($specification)->shouldReturn($singleResult);
248
    }
249
250
    public function it_matches_null_when_expecting_one_or_null_without_result_modifier(
251
        Specification $specification,