LegacyHydratorTest::setUp()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 13
Code Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
cc 1
eloc 8
c 2
b 0
f 0
nc 1
nop 0
dl 0
loc 13
rs 10
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