function it_should_convert_a_GUID_back_to_a_dn($connection)
{
$guid = 'a1131cd3-902b-44c6-b49a-1f6a567cda25';
$guidHex = '\\d3\\1c\\13\\a1\\2b\\90\\c6\\44\\b4\\9a\\1f\\6a\\56\\7c\\da\\25';
$connection->execute(Argument::that(function ($operation) use($guidHex, $guid) {
return $operation->getFilter() == '(&(&(objectClass=bar))(|(objectGuid=' . $guidHex . ')(cn=' . $guid . ')))';
}))->willReturn($this->entry);
$this->setOptions(['foo' => ['attribute' => 'cn', 'filter' => ['objectClass' => 'bar']]]);
$this->setAttribute('foo');
$this->setLdapConnection($connection);
$this->toLdap($guid)->shouldBeEqualTo($this->entry[0]['distinguishedname'][0]);
}