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

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

    function it_should_allow_multiple_converter_types_for_one_ldap_attribute()
    {
        $schema = new LdapObjectSchema('ad', 'user');
        $schema->setAttributeMap(['firstName' => 'givenName', 'lastName' => 'sn', 'created' => 'whenCreated', 'createdInt' => 'whenCreated']);
        $schema->setConverterMap(['created' => 'generalized_time', 'createdInt' => 'int']);
        $this->setLdapObjectSchema($schema);
        $this->setSelectedAttributes(['givenName', 'lastName', 'created', 'createdInt']);
        $this->hydrateFromLdap($this->ldapEntries[0])->shouldHaveKeyWithDateTime('created');
        $this->hydrateFromLdap($this->ldapEntries[0])->shouldHaveKeyWithInt('createdInt');
    }