Bug 18089: Remove warnings from tests using DBIx::Class fixtures

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 2e315c0cc6)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
This commit is contained in:
Jonathan Druart 2017-02-09 13:13:50 +01:00 committed by Katrin Fischer
parent c622e8df47
commit 8f086404ad
1 changed files with 22 additions and 2 deletions

View File

@ -16,18 +16,38 @@
# along with Koha; if not, see <http://www.gnu.org/licenses>.
use Modern::Perl;
use Test::More;
use Test::More tests => 9;
use File::Temp;
use File::Path qw/make_path/;
use t::lib::Mocks;
use Module::Load::Conditional qw/check_install/;
BEGIN {
my $context_module = t::lib::Mocks::mock_dbh;
if ( check_install( module => 'Test::DBIx::Class' ) ) {
plan tests => 10;
} else {
plan skip_all => "Need Test::DBIx::Class"
}
use_ok('C4::XSLT');
};
use Test::DBIx::Class {
schema_class => 'Koha::Schema',
connect_info => ['dbi:SQLite:dbname=:memory:','',''],
connect_opts => { name_sep => '.', quote_char => '`', },
fixture_class => '::Populate',
}, 'Branch' ;
fixtures_ok [
Branch => [
],
];
my $dir = File::Temp->newdir();
my @themes = ('prog', 'test');
my @langs = ('en', 'es-ES');