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

(-)a/t/db_dependent/Koha/Plugins/Barcode_transform_hooks.t (-1 / +6 lines)
Lines 42-48 t::lib::Mocks::mock_config( 'enable_plugins', 1 ); Link Here
42
42
43
subtest '() hook tests' => sub {
43
subtest '() hook tests' => sub {
44
44
45
    plan tests => 1;
45
    plan tests => 2;
46
46
47
    $schema->storage->txn_begin;
47
    $schema->storage->txn_begin;
48
48
Lines 52-57 subtest '() hook tests' => sub { Link Here
52
    my $plugin = Koha::Plugin::Test->new->enable;
52
    my $plugin = Koha::Plugin::Test->new->enable;
53
53
54
    my $patron = $builder->build_object( { class => 'Koha::Patrons' } );
54
    my $patron = $builder->build_object( { class => 'Koha::Patrons' } );
55
    my $cardnumber = $patron->cardnumber;
56
57
    warning_like { $patron->store(); }
58
        qr/patron_barcode_transform called with parameter: $cardnumber/,
59
        'Koha::Patron::store calls the patron_barcode_transform hook';
55
60
56
    t::lib::Mocks::mock_userenv(
61
    t::lib::Mocks::mock_userenv(
57
        {
62
        {
(-)a/t/lib/Koha/Plugin/Test.pm (-1 / +5 lines)
Lines 98-103 sub item_barcode_transform { Link Here
98
    Koha::Exceptions::Exception->throw("item_barcode_transform called with parameter: $barcode");
98
    Koha::Exceptions::Exception->throw("item_barcode_transform called with parameter: $barcode");
99
}
99
}
100
100
101
sub patron_barcode_transform {
102
    my ( $self, $barcode ) = @_;
103
    Koha::Exceptions::Exception->throw("patron_barcode_transform called with parameter: $barcode");
104
}
105
101
sub configure {
106
sub configure {
102
    my ( $self, $args ) = @_;
107
    my ( $self, $args ) = @_;
103
    return "Koha::Plugin::Test::configure";
108
    return "Koha::Plugin::Test::configure";
104
- 

Return to bug 26352