function it_should_hydrate_a_query_operation_to_ldap_with_a_schema($connection)
{
$this->schema->setBaseDn('dc=foo,dc=bar');
$this->setLdapObjectSchema($this->schema);
$this->setOperationType(AttributeConverterInterface::TYPE_SEARCH_TO);
$this->setLdapConnection($connection);
$filter = new FilterBuilder();
$collection = new OperatorCollection();
$collection->add($filter->eq('firstName', 'foo'));
$collection->add($filter->eq('lastName', 'bar'));
$collection->add($filter->eq('exchangeHideFromGAL', false));
$collection->addLdapObjectSchema($this->schema);
$operation = new QueryOperation($collection, ['foo']);
$this->hydrateToLdap($operation)->getFilter()->shouldBeEqualTo('(&(&(objectCategory=person)(objectClass=user))(givenName=foo)(sn=bar)(msExchHideFromAddressLists=FALSE))');
$this->hydrateToLdap($operation)->getBaseDn()->shouldBeEqualTo('dc=foo,dc=bar');
}