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

(-)a/t/Auth_with_shibboleth.t (-1 / +1 lines)
Lines 34-40 BEGIN { Link Here
34
    }
34
    }
35
}
35
}
36
36
37
use Test::DBIx::Class { schema_class => 'Koha::Schema', connect_info => ['dbi:SQLite:dbname=:memory:','',''] };
37
use Test::DBIx::Class;
38
38
39
# Mock Variables
39
# Mock Variables
40
my $matchpoint = 'userid';
40
my $matchpoint = 'userid';
(-)a/t/Biblio.t (-6 / +2 lines)
Lines 33-44 BEGIN { Link Here
33
33
34
use_ok('C4::Biblio');
34
use_ok('C4::Biblio');
35
35
36
use Test::DBIx::Class {
36
#use Test::DBIx::Class {}, 'Biblio';
37
    schema_class => 'Koha::Schema',
37
use Test::DBIx::Class; #No difference between these two invocations in time taken to execute tests.
38
    connect_info => ['dbi:SQLite:dbname=:memory:','',''],
39
    connect_opts => { name_sep => '.', quote_char => '`', },
40
    fixture_class => '::Populate',
41
}, 'Biblio' ;
42
38
43
sub fixtures {
39
sub fixtures {
44
    my ( $data ) = @_;
40
    my ( $data ) = @_;
(-)a/t/Calendar.t (-6 / +1 lines)
Lines 37-48 BEGIN { Link Here
37
37
38
use_ok('Koha::Calendar');
38
use_ok('Koha::Calendar');
39
39
40
use Test::DBIx::Class {
40
use Test::DBIx::Class;
41
    schema_class => 'Koha::Schema',
42
    connect_info => ['dbi:SQLite:dbname=:memory:','',''],
43
    connect_opts => { name_sep => '.', quote_char => '`', },
44
    fixture_class => '::Populate',
45
};
46
41
47
my $db = Test::MockModule->new('Koha::Database');
42
my $db = Test::MockModule->new('Koha::Database');
48
$db->mock(
43
$db->mock(
(-)a/t/Images.t (-6 / +1 lines)
Lines 32-43 BEGIN { Link Here
32
32
33
use_ok('C4::Images');
33
use_ok('C4::Images');
34
34
35
use Test::DBIx::Class {
35
use Test::DBIx::Class;
36
    schema_class => 'Koha::Schema',
37
    connect_info => ['dbi:SQLite:dbname=:memory:','',''],
38
    connect_opts => { name_sep => '.', quote_char => '`', },
39
    fixture_class => '::Populate',
40
}, 'Biblioimage' ;
41
36
42
# Make the code in the module use our mocked Koha::Schema/Koha::Database
37
# Make the code in the module use our mocked Koha::Schema/Koha::Database
43
my $db = Test::MockModule->new('Koha::Database');
38
my $db = Test::MockModule->new('Koha::Database');
(-)a/t/Koha.t (-6 / +1 lines)
Lines 33-44 BEGIN { Link Here
33
33
34
use_ok('C4::Koha');
34
use_ok('C4::Koha');
35
35
36
use Test::DBIx::Class {
36
use Test::DBIx::Class;
37
    schema_class => 'Koha::Schema',
38
    connect_info => ['dbi:SQLite:dbname=:memory:','',''],
39
    connect_opts => { name_sep => '.', quote_char => '`', },
40
    fixture_class => '::Populate',
41
}, 'Branch' ;
42
37
43
sub fixtures {
38
sub fixtures {
44
    my ( $libraries ) = @_;
39
    my ( $libraries ) = @_;
(-)a/t/Letters.t (-6 / +1 lines)
Lines 30-41 BEGIN { Link Here
30
    }
30
    }
31
}
31
}
32
32
33
use Test::DBIx::Class {
33
use Test::DBIx::Class;
34
    schema_class => 'Koha::Schema',
35
    connect_info => ['dbi:SQLite:dbname=:memory:','',''],
36
    connect_opts => { name_sep => '.', quote_char => '`', },
37
    fixture_class => '::Populate',
38
}, 'Letter' ;
39
use t::lib::Mocks;
34
use t::lib::Mocks;
40
35
41
fixtures_ok [
36
fixtures_ok [
(-)a/t/Matcher.t (-6 / +1 lines)
Lines 35-46 BEGIN { Link Here
35
35
36
use_ok('C4::Matcher');
36
use_ok('C4::Matcher');
37
37
38
use Test::DBIx::Class {
38
use Test::DBIx::Class;
39
    schema_class => 'Koha::Schema',
40
    connect_info => ['dbi:SQLite:dbname=:memory:','',''],
41
    connect_opts => { name_sep => '.', quote_char => '`', },
42
    fixture_class => '::Populate',
43
}, 'MarcMatcher' ;
44
39
45
fixtures_ok [
40
fixtures_ok [
46
    MarcMatcher => [
41
    MarcMatcher => [
(-)a/t/Members_AttributeTypes.t (-6 / +1 lines)
Lines 32-43 BEGIN { Link Here
32
32
33
use_ok('C4::Members::AttributeTypes');
33
use_ok('C4::Members::AttributeTypes');
34
34
35
use Test::DBIx::Class {
35
use Test::DBIx::Class;
36
    schema_class => 'Koha::Schema',
37
    connect_info => ['dbi:SQLite:dbname=:memory:','',''],
38
    connect_opts => { name_sep => '.', quote_char => '`', },
39
    fixture_class => '::Populate',
40
}, 'BorrowerAttributeType', 'Category' ;
41
36
42
fixtures_ok [
37
fixtures_ok [
43
    Category => [
38
    Category => [
(-)a/t/NorwegianPatronDB.t (-6 / +1 lines)
Lines 60-71 BEGIN { Link Here
60
    }
60
    }
61
}
61
}
62
62
63
use Test::DBIx::Class {
63
use Test::DBIx::Class {}, 'Borrower', 'BorrowerSync'; #Also loads those modules.
64
    schema_class => 'Koha::Schema',
65
    connect_info => ['dbi:SQLite:dbname=:memory:','',''],
66
    connect_opts => { name_sep => '.', quote_char => '`', },
67
    fixture_class => '::Populate',
68
}, 'Borrower', 'BorrowerSync';
69
64
70
# Make the code in the module use our mocked Koha::Schema/Koha::Database
65
# Make the code in the module use our mocked Koha::Schema/Koha::Database
71
my $db = Test::MockModule->new('Koha::Database');
66
my $db = Test::MockModule->new('Koha::Database');
(-)a/t/Prices.t (-6 / +1 lines)
Lines 20-31 use_ok('Koha::Number::Price'); Link Here
20
20
21
t::lib::Mocks::mock_preference( 'gist', '0.02|0.05|0.196' );
21
t::lib::Mocks::mock_preference( 'gist', '0.02|0.05|0.196' );
22
22
23
use Test::DBIx::Class {
23
use Test::DBIx::Class;
24
    schema_class => 'Koha::Schema',
25
    connect_info => ['dbi:SQLite:dbname=:memory:','',''],
26
    connect_opts => { name_sep => '.', quote_char => '`', },
27
    fixture_class => '::Populate',
28
}, 'Currency' ;
29
24
30
my $db = Test::MockModule->new('Koha::Database');
25
my $db = Test::MockModule->new('Koha::Database');
31
$db->mock( _new_schema => sub { return Schema(); } );
26
$db->mock( _new_schema => sub { return Schema(); } );
(-)a/t/SocialData.t (-6 / +1 lines)
Lines 34-45 BEGIN { Link Here
34
    use_ok('C4::SocialData');
34
    use_ok('C4::SocialData');
35
}
35
}
36
36
37
use Test::DBIx::Class {
37
use Test::DBIx::Class;
38
    schema_class => 'Koha::Schema',
39
    connect_info => ['dbi:SQLite:dbname=:memory:','',''],
40
    connect_opts => { name_sep => '.', quote_char => '`', },
41
    fixture_class => '::Populate',
42
}, 'SocialData', 'Biblioitem' ;
43
38
44
fixtures_ok [
39
fixtures_ok [
45
    Biblioitem => [
40
    Biblioitem => [
(-)a/t/XSLT.t (-12 / +1 lines)
Lines 35-52 BEGIN { Link Here
35
    use_ok('C4::XSLT');
35
    use_ok('C4::XSLT');
36
};
36
};
37
37
38
use Test::DBIx::Class {
38
use Test::DBIx::Class;
39
    schema_class => 'Koha::Schema',
40
    connect_info => ['dbi:SQLite:dbname=:memory:','',''],
41
    connect_opts => { name_sep => '.', quote_char => '`', },
42
    fixture_class => '::Populate',
43
}, 'Branch' ;
44
45
fixtures_ok [
46
    Branch => [
47
    ],
48
];
49
50
39
51
my $dir = File::Temp->newdir();
40
my $dir = File::Temp->newdir();
52
my @themes = ('prog', 'test');
41
my @themes = ('prog', 'test');
(-)a/t/db_dependent/Sitemapper.t (-6 / +1 lines)
Lines 40-51 sub slurp { Link Here
40
    return $cont;
40
    return $cont;
41
}
41
}
42
42
43
use Test::DBIx::Class {
43
use Test::DBIx::Class;
44
    schema_class => 'Koha::Schema',
45
    connect_info => ['dbi:SQLite:dbname=:memory:','',''],
46
    connect_opts => { name_sep => '.', quote_char => '`', },
47
    fixture_class => '::Populate',
48
}, 'Biblio' ;
49
44
50
sub fixtures {
45
sub fixtures {
51
    my ( $data ) = @_;
46
    my ( $data ) = @_;
(-)a/t/etc/schema.pl (-1 / +7 lines)
Line 0 Link Here
0
- 
1
{
2
  schema_class => 'Koha::Schema',
3
#  This is the default option when nothing is defined
4
#  connect_info => ['dbi:SQLite:dbname=:memory:','',''],
5
  connect_opts => { name_sep => '.', quote_char => '`', sqlite_unicode => 1},
6
  fixture_class => '::Populate',
7
};

Return to bug 18226