spec\LdapTools\Query\LdapQuerySpec::it_should_return_a_single_result_when_calling_getOneOrNullResult PHP Метод

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

    function it_should_return_a_single_result_when_calling_getOneOrNullResult($connection)
    {
        $result = $this->ldapEntries;
        $result['count'] = 1;
        unset($result[1]);
        $this->operation->setAttributes(['objectGuid']);
        $connection->execute(Argument::that(function ($op) {
            return $op->getAttributes() == ['objectGuid'];
        }))->willReturn($result);
        $this->getOneOrNullResult()->shouldReturnAnInstanceOf('\\LdapTools\\Object\\LdapObject');
        $this->getOneOrNullResult(HydratorFactory::TO_ARRAY)->shouldBeArray();
    }
LdapQuerySpec