function it_should_hydrate_the_ldap_filter_for_a_query_operation_based_off_the_current_alias($connection)
{
$this->setLdapConnection($connection);
$gSchema = $this->parser->parse('ad', 'group');
$operators = new OperatorCollection();
$operators->addLdapObjectSchema($this->schema, 'u');
$operators->addLdapObjectSchema($gSchema, 'g');
$operators->add(new Comparison('g.foo', '=', 'bar'));
$operators->add(new Comparison('u.bar', '=', 'foo'));
$operation = new QueryOperation($operators);
$this->setAlias('g');
$this->hydrateToLdap($operation)->getFilter()->shouldBeEqualTo('(&(objectClass=group)(foo=bar))');
}