function it_should_set_a_base_dn_from_the_schema_if_specified($connection)
{
$schema = new LdapObjectSchema('ad', 'user');
$schema->setFilter(new Comparison('foo', '=', 'bar'));
$schema->setBaseDn('ou=employees,dc=example,dc=local');
$this->operation->getFilter()->addLdapObjectSchema($schema);
$connection->execute(Argument::that(function ($op) {
return $op->getBaseDn() == 'ou=employees,dc=example,dc=local';
}))->willReturn($this->ldapEntries);
$this->execute();
}