1Test::Net::LDAP::Util(3U)ser Contributed Perl DocumentatiToenst::Net::LDAP::Util(3)
2
3
4

NAME

6       Test::Net::LDAP::Util - Testing utilities for Test::Net::LDAP
7

EXPORT

9       The following subroutines are exported on demand.
10
11           use Test::Net::LDAP::Util qw(
12               ldap_result_ok
13               ldap_result_is
14               ldap_mockify
15               ldap_dn_is
16           );
17
18       All the subroutines are exported if ":all" is specified.
19
20           use Test::Net::LDAP::Util ':all';
21

SUBROUTINES

23   ldap_result_ok
24           ldap_result_ok($mesg, $name);
25
26       Tests the result of an LDAP operation to see if the code is
27       "LDAP_SUCCESS".
28
29       $mesg is either a Net::LDAP::Message object returned by LDAP operation
30       methods or a result code.
31
32       $name is the optional test name.
33
34   ldap_result_is
35           ldap_result_is($mesg, $expect, $name);
36
37       Tests the result of an LDAP operation to see if the code is equal to
38       $expect.
39
40       The values of $mesg and $expect are either a Net::LDAP::Message object
41       returned by LDAP operation methods or a result code.
42
43       $name is the optional test name.
44
45   ldap_mockify
46           ldap_mockify {
47               # CODE
48           };
49
50       Inside the code block (recursively), all the occurrences of
51       "Net::LDAP::new" are replaced by "Test::Net::LDAP::Mock::new".
52
53       Subclasses of "Net::LDAP" are also mockified. "Test::Net::LDAP::Mock"
54       is inserted into @ISA of each subclass, only within the context of
55       "ldap_mockify".
56
57       See Test::Net::LDAP::Mock for more details.
58
59   ldap_dn_is
60           ldap_dn_is($actual_dn, $expect_dn, $name);
61
62       Tests equality of two DNs that are not necessarily canonicalized.
63
64       The comparison is case-insensitive.
65
66
67
68perl v5.32.0                      2020-10-21          Test::Net::LDAP::Util(3)
Impressum