spec\LdapTools\Object\LdapObjectManagerSpec::it_should_error_on_restore_if_the_last_known_location_cannot_be_found_and_none_was_specified PHP Метод

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

    function it_should_error_on_restore_if_the_last_known_location_cannot_be_found_and_none_was_specified($connection)
    {
        $dn = 'cn=foo\\0ADEL:0101011,cn=Deleted Objects,dc=example,dc=local';
        $ldapObject = new LdapObject(['dn' => $dn], 'deleted');
        $connection->execute(Argument::type('\\LdapTools\\Operation\\QueryOperation'))->shouldBeCalled()->willReturn(['count' => 0]);
        $connection->getRootDse()->willReturn(new LdapObject(['defaultNamingContext' => 'dc=foo,dc=bar']));
        $this->shouldThrow(new InvalidArgumentException('No restore location specified and cannot find the last known location for "' . $dn . '".'))->duringRestore($ldapObject);
    }