DefaultObjectFactoryTest   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A test() 0 11 1
1
<?php
2
namespace Mathielen\DataImport\Writer\ObjectWriter;
3
4
class DefaultObjectFactoryTest extends \PHPUnit_Framework_TestCase
5
{
6
7
    public function test()
8
    {
9
        $of = new DefaultObjectFactory('TestEntities\Dummy');
10
11
        $item = array('name' => 'Peter');
12
        $actualObject = $of->factor($item);
13
14
        $expectedObject = new \TestEntities\Dummy('Peter');
15
16
        $this->assertEquals($expectedObject, $actualObject);
17
    }
18
19
}
20