LegacyHydratorTest   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 9
c 2
b 0
f 0
dl 0
loc 15
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A setUp() 0 13 1
1
<?php
2
3
namespace DoL\LdapBundle\Tests\Hydrator;
4
5
use FOS\UserBundle\Model\UserManagerInterface;
6
use DoL\LdapBundle\Hydrator\LegacyHydrator;
7
use DoL\LdapBundle\Tests\TestUser;
8
9
class LegacyHydratorTest extends AbstractHydratorTestCase
10
{
11
    protected function setUp()
12
    {
13
        parent::setUp();
14
15
        /** @var UserManagerInterface|\PHPUnit_Framework_MockObject_MockObject $userManager */
16
        $userManager = $this->getMock('FOS\UserBundle\Model\UserManagerInterface');
17
        $userManager->expects($this->any())
18
            ->method('createUser')
19
            ->will($this->returnValue(new TestUser()));
20
21
        $this->hydrator = new LegacyHydrator($userManager);
22
        $config = $this->getDefaultUserConfig();
23
        $this->hydrator->setAttributeMap($config['attributes']);
24
    }
25
}
26