From 70ae3a9dc26bb0af8567431c3e0e5d236a527103 Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Tue, 2 May 2017 15:46:08 +0200 Subject: [PATCH] Bug 18286: [QA Follow-up] Fix some warnings from qa tools [1] Resolve warning on variable assignment before use strict. [2] Remove unused $schema variable. [3] Remove eval expression construction. Signed-off-by: Marcel de Rooy Signed-off-by: Jonathan Druart --- t/db_dependent/01-test_dbic.t | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/t/db_dependent/01-test_dbic.t b/t/db_dependent/01-test_dbic.t index 9f63d20218..0741332b51 100644 --- a/t/db_dependent/01-test_dbic.t +++ b/t/db_dependent/01-test_dbic.t @@ -1,7 +1,6 @@ #!/usr/bin/perl # This file is part of Koha. -my $verbose = 0; use Modern::Perl; @@ -10,12 +9,14 @@ use Test::MockModule; use Koha::Libraries; use C4::Context; + Koha::Libraries->search->count; +my $verbose = 0; subtest "Scenario: Show how caching prevents Test::DBIx::Class from working properly and how to circumvent it", sub { - my ($firstSchema, $schema, $cachedSchema, $cachedSchema2, $firstLibCount, $libCount); + my ($firstSchema, $cachedSchema, $cachedSchema2, $firstLibCount, $libCount); eval { @@ -74,13 +75,13 @@ subtest "Scenario: Show how caching prevents Test::DBIx::Class from working prop ' And the cached DB connection type is sqlite'); - eval "fixtures_ok [ #Dynamically load fixtures, because we dynamically load T:D:C. Otherwise there be compile errors! + fixtures_ok( [ #Dynamically load fixtures, because we dynamically load T:D:C. Otherwise there be compile errors! Branch => [ ['branchcode', 'branchname'], ['XXX_test', 'my branchname XXX'], ] ], - 'Step: Given we deploy T:D:C Fixtures';"; + 'Step: Given we deploy T:D:C Fixtures'); ok($libCount = Koha::Libraries->search->count, ' When the libraries are counted');