View | Details | Raw Unified | Return to bug 30848
Collapse All | Expand All

(-)a/Koha/Filter/MARC/ExpandAuthorizedValues.pm (-4 / +4 lines)
Lines 1-4 Link Here
1
package Koha::Filter::MARC::ExpandAuthorizedValues;
1
package Koha::Filter::MARC::ExpandCodedFields;
2
2
3
# Copyright 2022 PTFS Europe
3
# Copyright 2022 PTFS Europe
4
#
4
#
Lines 19-25 package Koha::Filter::MARC::ExpandAuthorizedValues; Link Here
19
19
20
=head1 NAME
20
=head1 NAME
21
21
22
Koha::Filter::MARC::ExpandAuthorizedValues - Replaces AV codes with descriptions in MARC::Record objects.
22
Koha::Filter::MARC::ExpandCodedFields - Replaces AV codes with descriptions in MARC::Record objects.
23
23
24
=head1 SYNOPSIS
24
=head1 SYNOPSIS
25
25
Lines 32-38 Koha::Filter::MARC::ExpandAuthorizedValues - Replaces AV codes with descriptions Link Here
32
32
33
  my $record_processor = Koha::RecordProcessor->new(
33
  my $record_processor = Koha::RecordProcessor->new(
34
    {
34
    {
35
        filters => ['ExpandAuthorizedValues'],
35
        filters => ['ExpandCodedFields'],
36
        options => {
36
        options => {
37
            interface => 'opac',
37
            interface => 'opac',
38
        }
38
        }
Lines 57-63 use Koha::Libraries; Link Here
57
use Koha::ItemTypes;
57
use Koha::ItemTypes;
58
58
59
use base qw(Koha::RecordProcessor::Base);
59
use base qw(Koha::RecordProcessor::Base);
60
our $NAME = 'ExpandAuthorizedValues';
60
our $NAME = 'ExpandCodedFields';
61
61
62
=head2 filter
62
=head2 filter
63
63
(-)a/t/db_dependent/Koha/Filter/ExpandAuthorizedValues.t (-4 / +3 lines)
Lines 33-39 use Koha::RecordProcessor; Link Here
33
my $schema  = Koha::Database->schema();
33
my $schema  = Koha::Database->schema();
34
my $builder = t::lib::TestBuilder->new();
34
my $builder = t::lib::TestBuilder->new();
35
35
36
subtest 'ExpandAuthorizedValues tests' => sub {
36
subtest 'ExpandCodedFields tests' => sub {
37
37
38
    plan tests => 10;
38
    plan tests => 10;
39
39
Lines 76-85 subtest 'ExpandAuthorizedValues tests' => sub { Link Here
76
    my $processor = Koha::RecordProcessor->new(
76
    my $processor = Koha::RecordProcessor->new(
77
        {
77
        {
78
            schema  => 'MARC',
78
            schema  => 'MARC',
79
            filters => ['ExpandAuthorizedValues'],
79
            filters => ['ExpandCodedFields'],
80
        }
80
        }
81
    );
81
    );
82
    is( ref($processor), 'Koha::RecordProcessor', 'Created record processor with ExpandAuthorizedValues filter' );
82
    is( ref($processor), 'Koha::RecordProcessor', 'Created record processor with ExpandCodedFields filter' );
83
83
84
    my $result = $processor->process( $record );
84
    my $result = $processor->process( $record );
85
    is( ref($result), 'MARC::Record', 'It returns a reference to a MARC::Record object' );
85
    is( ref($result), 'MARC::Record', 'It returns a reference to a MARC::Record object' );
86
- 

Return to bug 30848