Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

t/7{1pre,2post}read.t: don't use deprecated methods

Use Net::LDAP::Entry->get_value instead of the deprecated get_attrbute
to avoid a deprecation warning in the tests.
  • Loading branch information...
commit 4a0c5441c297ccf9bd6a5fabede8d0f27d354780 1 parent a17b5c2
@marschap authored
Showing with 4 additions and 4 deletions.
  1. +2 −2 t/71preread.t
  2. +2 −2 t/72postread.t
View
4 t/71preread.t
@@ -54,7 +54,7 @@ SKIP: {
ok(!$mesg->code, "search: ". $mesg->code . ": " . $mesg->error);
my $entry = $mesg->entry(0);
- my $origValue = join(':', map { sort $entry->get_attribute($_) } @{$test->{attrs}});
+ my $origValue = join(':', map { sort $entry->get_value($_) } @{$test->{attrs}});
$control = Net::LDAP::Control::PreRead->new(attrs => $test->{attrs});
isa_ok($control, Net::LDAP::Control::PreRead, "control object");
@@ -71,7 +71,7 @@ SKIP: {
$entry = $previous->entry();
isa_ok($entry, Net::LDAP::Entry, "entry object");
- my $prereadValue = join(':', map { sort $entry->get_attribute($_) } @{$test->{attrs}});
+ my $prereadValue = join(':', map { sort $entry->get_value($_) } @{$test->{attrs}});
is($prereadValue, $origValue, "value in PreRead control matches");
}
}
View
4 t/72postread.t
@@ -66,7 +66,7 @@ SKIP: {
$entry = $previous->entry();
isa_ok($entry, Net::LDAP::Entry, "entry object");
- my $postreadValue = join(':', map { sort $entry->get_attribute($_) } @{$test->{attrs}});
+ my $postreadValue = join(':', map { sort $entry->get_value($_) } @{$test->{attrs}});
$mesg = $ldap->search(base => @{$test->{dn}} ? $test->{dn}[0] : '',
filter => '(objectclass=*)',
@@ -75,7 +75,7 @@ SKIP: {
ok(!$mesg->code, "search: ". $mesg->code . ": " . $mesg->error);
$entry = $mesg->entry(0);
- my $origValue = join(':', map { sort $entry->get_attribute($_) } @{$test->{attrs}});
+ my $origValue = join(':', map { sort $entry->get_value($_) } @{$test->{attrs}});
is($postreadValue, $origValue, "value in PostRead control matches");
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.