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

(-)a/t/lib/Mocks.pm (-3 / +5 lines)
Lines 24-34 sub mock_config { Link Here
24
24
25
my %preferences;
25
my %preferences;
26
sub mock_preference {
26
sub mock_preference {
27
    my $context = new Test::MockModule('C4::Context');
28
    my ( $pref, $value ) = @_;
27
    my ( $pref, $value ) = @_;
29
    $preferences{$pref} = $value;
28
29
    $preferences{lc($pref)} = $value;
30
31
    my $context = new Test::MockModule('C4::Context');
30
    $context->mock('preference', sub {
32
    $context->mock('preference', sub {
31
        my ( $self, $pref ) = @_;
33
        my ( $self, $pref ) = @_;
34
        $pref = lc($pref);
32
        if ( exists $preferences{$pref} ) {
35
        if ( exists $preferences{$pref} ) {
33
            return $preferences{$pref}
36
            return $preferences{$pref}
34
        } else {
37
        } else {
35
- 

Return to bug 16134