From c128166e0a579ea9c46e3965a9215e783e13ef5b Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Fri, 9 Oct 2020 12:09:08 +0200 Subject: [PATCH] Bug 26518: Hide expected DBI warnings --- t/db_dependent/Biblio.t | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/t/db_dependent/Biblio.t b/t/db_dependent/Biblio.t index a3381bd71f..1914294027 100755 --- a/t/db_dependent/Biblio.t +++ b/t/db_dependent/Biblio.t @@ -55,8 +55,13 @@ subtest 'AddBiblio' => sub { $record->append_fields($lccn_field); my $nb_biblios = Koha::Biblios->count; - my ( $biblionumber, $biblioitemnumber ) = - C4::Biblio::AddBiblio( $record, '' ); + my ( $biblionumber, $biblioitemnumber ); + { + local *STDERR; + open STDERR, '>', '/dev/null'; + ( $biblionumber, $biblioitemnumber ) = C4::Biblio::AddBiblio( $record, '' ); + close STDERR; + } is( $biblionumber, undef, 'AddBiblio returns undef for biblionumber if something went wrong' ); is( $biblioitemnumber, undef, -- 2.20.1