AbstractHydratorTestCase::getDefaultUserConfig()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 5
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 9
rs 10
1
<?php
2
3
namespace DoL\LdapBundle\Tests\Hydrator;
4
5
use DoL\LdapBundle\Tests\DependencyInjection\ConfigurationTrait;
6
7
abstract class AbstractHydratorTestCase extends \PHPUnit_Framework_TestCase
8
{
9
    use ConfigurationTrait {
10
        getDefaultUserConfig as parentGetDefaultUserConfig;
11
    }
12
    use HydratorInterfaceTestTrait;
13
14
    /**
15
     * Returns default configuration for User subtree.
16
     *
17
     * Same as service parameter `dol_ldap.ldap_manager.parameters`
18
     *
19
     * @return array
20
     */
21
    protected function getDefaultUserConfig()
22
    {
23
        $config = $this->parentGetDefaultUserConfig();
24
        $config['attributes'][] = [
25
            'ldap_attr' => 'roles',
26
            'user_method' => 'setRoles',
27
        ];
28
29
        return $config;
30
    }
31
}
32