spec\LdapTools\Hydrator\ArrayHydratorSpec::it_should_merge_default_attributes_to_ldap PHP Метод

it_should_merge_default_attributes_to_ldap() публичный Метод

    function it_should_merge_default_attributes_to_ldap()
    {
        $schema = new LdapObjectSchema('ad', 'user');
        $schema->setDefaultValues(['phoneNumber' => '555-2368', 'emailAddress' => '%firstname%.lastname%@%whoyougonnacall%', 'enabled' => false]);
        $this->setLdapObjectSchema($schema);
        $this->setParameter('whoyougonnacall', 'ghostbusters.local');
        $this->hydrateToLdap($this->objectToLdap)->shouldHaveKeyWithValue('phoneNumber', '555-2368');
        $this->hydrateToLdap($this->objectToLdap)->shouldNotContain('[email protected]');
        $this->hydrateToLdap($this->objectToLdap)->shouldHaveKeyWithValue('enabled', false);
    }