ValueConverterStepTest   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A setUp() 0 4 1
A testProcess() 0 9 1
1
<?php
2
3
namespace Ddeboer\DataImport\Tests\Step;
4
5
use Ddeboer\DataImport\Step\ValueConverterStep;
6
7
class ValueConverterStepTest extends \PHPUnit_Framework_TestCase
8
{
9
    protected function setUp()
10
    {
11
        $this->filter = new ValueConverterStep();
12
    }
13
14
    public function testProcess()
15
    {
16
        $this->filter->add('[foo]', function($v) { return 'barfoo'; });
0 ignored issues
show
Unused Code introduced by
The parameter $v 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...
17
18
        $data = ['foo' => 'foobar'];
19
        $this->filter->process($data);
20
21
        $this->assertEquals(['foo' => 'barfoo'], $data);
22
    }
23
}
24