@@ 25-38 (lines=14) @@ | ||
22 | /** |
|
23 | * @mixin AsArray |
|
24 | */ |
|
25 | class AsArraySpec extends ObjectBehavior |
|
26 | { |
|
27 | public function it_is_a_result_modifier() |
|
28 | { |
|
29 | $this->shouldBeAnInstanceOf(ResultModifier::class); |
|
30 | } |
|
31 | ||
32 | public function it_sets_hydration_mode_to_array(AbstractQuery $query) |
|
33 | { |
|
34 | $query->setHydrationMode(Query::HYDRATE_ARRAY)->shouldBeCalled(); |
|
35 | ||
36 | $this->modify($query); |
|
37 | } |
|
38 | } |
|
39 |
@@ 25-38 (lines=14) @@ | ||
22 | /** |
|
23 | * @mixin AsSingleScalar |
|
24 | */ |
|
25 | class AsSingleScalarSpec extends ObjectBehavior |
|
26 | { |
|
27 | public function it_is_a_result_modifier() |
|
28 | { |
|
29 | $this->shouldBeAnInstanceOf(ResultModifier::class); |
|
30 | } |
|
31 | ||
32 | public function it_sets_hydration_mode_to_object(AbstractQuery $query) |
|
33 | { |
|
34 | $query->setHydrationMode(Query::HYDRATE_SINGLE_SCALAR)->shouldBeCalled(); |
|
35 | ||
36 | $this->modify($query); |
|
37 | } |
|
38 | } |
|
39 |