ValueConverterStepSpec::it_is_a_step()   A
last analyzed

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 spec\Port\Steps\Step;
4
5
use Port\Steps\Step;
6
use PhpSpec\ObjectBehavior;
7
8
class ValueConverterStepSpec extends ObjectBehavior
9
{
10
    function it_is_initializable()
11
    {
12
        $this->shouldHaveType('Port\Steps\Step\ValueConverterStep');
13
    }
14
15
    function it_is_a_step()
16
    {
17
        $this->shouldHaveType('Port\Steps\Step');
18
    }
19
20
    function it_processes_an_item(Step $step)
21
    {
22
        $next = function() {};
23
        $item = ['foo' => 'bar'];
24
        $item2 = ['foo' => 'baz'];
25
        $step->process($item2, $next)->willReturn(true);
26
27
        $this->add('[foo]', function($item) use($item2) {
0 ignored issues
show
Unused Code introduced by
The parameter $item is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
28
            return $item2;
29
        })->shouldReturn($this);
30
31
        $this->process(
0 ignored issues
show
Bug introduced by
The method process() does not exist on spec\Port\Steps\Step\ValueConverterStepSpec. Did you maybe mean it_processes_an_item()?

This check marks calls to methods that do not seem to exist on an object.

This is most likely the result of a method being renamed without all references to it being renamed likewise.

Loading history...
32
            $item,
33
            function($item) use ($step, $next) {
34
                return $step->process($item, $next);
35
            }
36
        );
37
    }
38
}
39