@@ 50-63 (lines=14) @@ | ||
47 | $this->beConstructedWith($entityManager, $classMetadata); |
|
48 | } |
|
49 | ||
50 | public function it_should_modify_query( |
|
51 | QueryModifier $specification, |
|
52 | EntityManager $entityManager, |
|
53 | QueryBuilder $qb, |
|
54 | AbstractQuery $query |
|
55 | ): void { |
|
56 | $this->prepareEntityManagerStub($entityManager, $qb); |
|
57 | $this->prepareQueryBuilderStub($qb, $query); |
|
58 | $query->execute()->willReturn($this->result); |
|
59 | ||
60 | $specification->modify($qb, $this->alias)->shouldBeCalled(); |
|
61 | ||
62 | $this->match($specification); |
|
63 | } |
|
64 | ||
65 | public function it_should_apply_filter( |
|
66 | Filter $specification, |
|
@@ 115-127 (lines=13) @@ | ||
112 | $this->match($specification)->shouldReturn($this->result); |
|
113 | } |
|
114 | ||
115 | public function it_matches_a_specification_without_result_modifier( |
|
116 | Specification $specification, |
|
117 | EntityManager $entityManager, |
|
118 | QueryBuilder $qb, |
|
119 | AbstractQuery $query |
|
120 | ): void { |
|
121 | $this->prepareStubs($specification, $entityManager, $qb, $query); |
|
122 | $query->execute()->willReturn($this->result); |
|
123 | ||
124 | $specification->modify($qb, $this->alias)->shouldBeCalled(); |
|
125 | ||
126 | $this->match($specification)->shouldReturn($this->result); |
|
127 | } |
|
128 | ||
129 | public function it_matches_a_single_result_without_result_modifier( |
|
130 | Specification $specification, |