Permalink
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...
1 parent a17b5c2 commit 4a0c5441c297ccf9bd6a5fabede8d0f27d354780 @marschap committed Jan 26, 2013
Showing with 4 additions and 4 deletions.
  1. +2 −2 t/71preread.t
  2. +2 −2 t/72postread.t
View
@@ -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
@@ -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");
}
}

0 comments on commit 4a0c544

Please sign in to comment.