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

it_not_convert_field_to_selection()   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 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