AsScalarSpec::it_sets_hydration_mode_to_object()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
1
<?php
2
3
/**
4
 * This file is part of the Happyr Doctrine Specification package.
5
 *
6
 * (c) Tobias Nyholm <[email protected]>
7
 *     Kacper Gunia <[email protected]>
8
 *     Peter Gribanov <[email protected]>
9
 *
10
 * For the full copyright and license information, please view the LICENSE
11
 * file that was distributed with this source code.
12
 */
13
14
namespace tests\Happyr\DoctrineSpecification\Result;
15
16
use Doctrine\ORM\AbstractQuery;
17
use Doctrine\ORM\Query;
18
use Happyr\DoctrineSpecification\Result\AsScalar;
19
use PhpSpec\ObjectBehavior;
20
21
/**
22
 * @mixin AsScalar
23
 */
24
class AsScalarSpec extends ObjectBehavior
25
{
26
    public function it_is_a_result_modifier()
27
    {
28
        $this->shouldBeAnInstanceOf('Happyr\DoctrineSpecification\Result\ResultModifier');
29
    }
30
31
    public function it_sets_hydration_mode_to_object(AbstractQuery $query)
32
    {
33
        $query->setHydrationMode(Query::HYDRATE_SCALAR)->shouldBeCalled();
34
35
        $this->modify($query);
36
    }
37
}
38