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

AsArraySpec   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
c 1
b 0
f 0
lcom 0
cbo 2
dl 0
loc 14
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A it_is_a_result_modifier() 0 4 1
A it_sets_hydration_mode_to_array() 0 6 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\AsArray;
8
use PhpSpec\ObjectBehavior;
9
10
/**
11
 * @mixin AsArray
12
 */
13
class AsArraySpec 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_array(AbstractQuery $query)
21
    {
22
        $query->setHydrationMode(Query::HYDRATE_ARRAY)->shouldBeCalled();
23
24
        $this->modify($query);
25
    }
26
}
27