| @@ 26-39 (lines=14) @@ | ||
| 23 | $this->shouldHaveType('Port\Steps\Step'); |
|
| 24 | } |
|
| 25 | ||
| 26 | function it_processes_an_item(Writer $writer, Step $step) |
|
| 27 | { |
|
| 28 | $next = function() {}; |
|
| 29 | $item = []; |
|
| 30 | $step->process($item, $next)->willReturn(true); |
|
| 31 | $writer->writeItem($item)->shouldBeCalled(); |
|
| 32 | ||
| 33 | $this->process( |
|
| 34 | $item, |
|
| 35 | function($item) use ($step, $next) { |
|
| 36 | return $step->process($item, $next); |
|
| 37 | } |
|
| 38 | ); |
|
| 39 | } |
|
| 40 | } |
|
| 41 | ||
| @@ 20-32 (lines=13) @@ | ||
| 17 | $this->shouldHaveType('Port\Steps\Step'); |
|
| 18 | } |
|
| 19 | ||
| 20 | function it_processes_an_item(Step $step) |
|
| 21 | { |
|
| 22 | $next = function() {}; |
|
| 23 | $item = []; |
|
| 24 | $step->process($item, $next)->willReturn(true); |
|
| 25 | ||
| 26 | $this->process( |
|
| 27 | $item, |
|
| 28 | function($item) use ($step, $next) { |
|
| 29 | return $step->process($item, $next); |
|
| 30 | } |
|
| 31 | ); |
|
| 32 | } |
|
| 33 | ||
| 34 | function it_processes_and_filters_an_item(Step $step) |
|
| 35 | { |
|