Completed
Push — patch-meta ( 5bd3e7 )
by Tobias
08:29
created

it_sets_hydration_mode_to_object()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 6
rs 9.4285
cc 1
eloc 3
nc 1
nop 1
1
<?php
2
3
namespace tests\Happyr\DoctrineSpecification\Result;
4
5
use Doctrine\ORM\AbstractQuery;
6
use Doctrine\ORM\Query;
7
use Happyr\DoctrineSpecification\Result\AsSingleScalar;
8
use PhpSpec\ObjectBehavior;
9
10
/**
11
 * @mixin AsSingleScalar
12
 */
13
class AsSingleScalarSpec extends ObjectBehavior
14
{
15
    public function it_is_a_result_modifier()
16
    {
17
        $this->shouldBeAnInstanceOf('Happyr\DoctrineSpecification\Result\ResultModifier');
18
    }
19
20
    public function it_sets_hydration_mode_to_object(AbstractQuery $query)
21
    {
22
        $query->setHydrationMode(Query::HYDRATE_SINGLE_SCALAR)->shouldBeCalled();
23
24
        $this->modify($query);
25
    }
26
}
27