AbstractHydratorTestCase   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A getDefaultUserConfig() 0 9 1
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