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

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

    function it_should_throw_EmptyResultException_when_no_results_are_returned_but_one_is_expected($connection)
    {
        $this->operation->setAttributes(['objectGuid']);
        $connection->execute(Argument::that(function ($op) {
            return $op->getAttributes() == ['objectGuid'];
        }))->willReturn([]);
        $this->shouldThrow('\\LdapTools\\Exception\\EmptyResultException')->duringGetSingleResult();
        $this->shouldThrow('\\LdapTools\\Exception\\EmptyResultException')->duringGetSingleResult(HydratorFactory::TO_ARRAY);
    }
LdapQuerySpec