Completed
Push — master ( 162ff2...83d928 )
by Peter
08:18 queued 10s
created

DistinctSpec::it_is_a_distinct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
namespace tests\Happyr\DoctrineSpecification\Query;
4
5
use Doctrine\ORM\QueryBuilder;
6
use Happyr\DoctrineSpecification\Query\Distinct;
7
use Happyr\DoctrineSpecification\Query\QueryModifier;
8
use PhpSpec\ObjectBehavior;
9
10
/**
11
 * @mixin Distinct
12
 */
13
class DistinctSpec extends ObjectBehavior
14
{
15
    public function it_is_a_distinct()
16
    {
17
        $this->shouldBeAnInstanceOf(Distinct::class);
18
    }
19
20
    public function it_is_a_query_modifier()
21
    {
22
        $this->shouldHaveType(QueryModifier::class);
23
    }
24
25
    public function it_add_having(QueryBuilder $qb)
26
    {
27
        $qb->distinct()->shouldBeCalled();
28
        $this->modify($qb, 'a');
29
    }
30
}
31