Completed
Push — 1.0 ( 75b22b...f155d9 )
by Peter
15:56 queued 05:56
created

ArgumentToSelectionConverterSpec   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 1
dl 0
loc 17
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A it_is_a_converter() 0 4 1
A it_not_convert_field_to_selection() 0 4 1
A it_convert_argument_to_field() 0 4 1
1
<?php
2
3
namespace tests\Happyr\DoctrineSpecification\Query\Selection;
4
5
use Happyr\DoctrineSpecification\Operand\Field;
6
use Happyr\DoctrineSpecification\Query\Selection\ArgumentToSelectionConverter;
7
use PhpSpec\ObjectBehavior;
8
9
/**
10
 * @mixin ArgumentToSelectionConverter
11
 */
12
class ArgumentToSelectionConverterSpec extends ObjectBehavior
13
{
14
    public function it_is_a_converter()
15
    {
16
        $this->shouldBeAnInstanceOf('Happyr\DoctrineSpecification\Query\Selection\ArgumentToSelectionConverter');
17
    }
18
19
    public function it_not_convert_field_to_selection(Field $field)
20
    {
21
        $this->toSelection($field)->shouldReturn($field);
22
    }
23
24
    public function it_convert_argument_to_field()
25
    {
26
        $this->toSelection('foo')->shouldBeAnInstanceOf('Happyr\DoctrineSpecification\Operand\Field');
27
    }
28
}
29