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

(-)a/t/db_dependent/Koha/Session.t (-2 / +11 lines)
Lines 4-9 use Modern::Perl; Link Here
4
use Test::More tests => 2;
4
use Test::More tests => 2;
5
5
6
use t::lib::TestBuilder;
6
use t::lib::TestBuilder;
7
use t::lib::Mocks;
7
use C4::Auth;
8
use C4::Auth;
8
use Koha::Session;
9
use Koha::Session;
9
10
Lines 29-36 subtest 'basic session fetch' => sub { Link Here
29
};
30
};
30
31
31
subtest 'test session driver' => sub {
32
subtest 'test session driver' => sub {
32
    plan tests => 1;
33
    plan tests => 3;
33
34
35
    t::lib::Mocks::mock_preference( 'SessionStorage', 'mysql' );
34
    my $params = Koha::Session->_get_session_params();
36
    my $params = Koha::Session->_get_session_params();
35
    is( $params->{dsn}, 'serializer:yamlxs;driver:MySQL;id:md5', 'dsn setup correctly' );
37
    is( $params->{dsn}, 'serializer:yamlxs;driver:MySQL;id:md5', 'dsn setup correctly' );
38
39
    t::lib::Mocks::mock_preference( 'SessionStorage', 'tmp' );
40
    $params = Koha::Session->_get_session_params();
41
    is( $params->{dsn}, 'serializer:yamlxs;driver:File;id:md5', 'dsn setup correctly' );
42
43
    t::lib::Mocks::mock_preference( 'SessionStorage', 'memcached' );
44
    $params = Koha::Session->_get_session_params();
45
    is( $params->{dsn}, 'serializer:yamlxs;driver:memcached;id:md5', 'dsn setup correctly' );
36
};
46
};
37
- 

Return to bug 39214