Bugzilla – Attachment 67856 Details for
Bug 19441
Several tests are failing on 16.05.x
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 19441: Fix t/db_dependent/Biblio/TransformKohaToMarc.t
Bug-19441-Fix-tdbdependentBiblioTransformKohaToMar.patch (text/plain), 2.56 KB, created by
Jonathan Druart
on 2017-10-09 21:49:45 UTC
(
hide
)
Description:
Bug 19441: Fix t/db_dependent/Biblio/TransformKohaToMarc.t
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2017-10-09 21:49:45 UTC
Size:
2.56 KB
patch
obsolete
>From 6c582a8f968ec632dd179407688965129196e139 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Mon, 9 Oct 2017 18:32:18 -0300 >Subject: [PATCH] Bug 19441: Fix t/db_dependent/Biblio/TransformKohaToMarc.t > >Koha::Caches and Koha::MarcSubfieldStructures do not exist in 16.05.x >--- > t/db_dependent/Biblio/TransformKohaToMarc.t | 18 ++++++++---------- > 1 file changed, 8 insertions(+), 10 deletions(-) > >diff --git a/t/db_dependent/Biblio/TransformKohaToMarc.t b/t/db_dependent/Biblio/TransformKohaToMarc.t >index 34a2a5eaa4..1b37c72612 100644 >--- a/t/db_dependent/Biblio/TransformKohaToMarc.t >+++ b/t/db_dependent/Biblio/TransformKohaToMarc.t >@@ -4,21 +4,19 @@ use MARC::Record; > > use t::lib::Mocks; > use Koha::Database; >-use Koha::Caches; >-use Koha::MarcSubfieldStructures; >+use Koha::Cache; > use C4::Biblio; > > my $schema = Koha::Database->new->schema; > $schema->storage->txn_begin; >+my $dbh = C4::Context->dbh; > > # Create/overwrite some Koha to MARC mappings in default framework >-my $mapping1 = Koha::MarcSubfieldStructures->find('','300','a') // Koha::MarcSubfieldStructure->new({ frameworkcode => '', tagfield => '300', tagsubfield => 'a' }); >-$mapping1->kohafield( "mytable.nicepages" ); >-$mapping1->store; >-my $mapping2 = Koha::MarcSubfieldStructures->find('','300','b') // Koha::MarcSubfieldStructure->new({ frameworkcode => '', tagfield => '300', tagsubfield => 'b' }); >-$mapping2->kohafield( "mytable2.goodillustrations" ); >-$mapping2->store; >-Koha::Caches->get_instance->clear_from_cache( "MarcSubfieldStructure-" ); >+$dbh->do(q|DELETE FROM marc_subfield_structure WHERE frameworkcode='' and tagfield=300 and tagsubfield='a'|); >+$dbh->do(q|INSERT INTO marc_subfield_structure(frameworkcode, tagfield, tagsubfield, kohafield) VALUES ('', 300, 'a', 'mytable.nicepages')|); >+$dbh->do(q|DELETE FROM marc_subfield_structure WHERE frameworkcode='' and tagfield=300 and tagsubfield='b'|); >+$dbh->do(q|INSERT INTO marc_subfield_structure(frameworkcode, tagfield, tagsubfield, kohafield) VALUES ('', 300, 'b', 'mytable2.goodillustrations')|); >+Koha::Cache->get_instance->clear_from_cache( "MarcSubfieldStructure-" ); > > my $record = C4::Biblio::TransformKohaToMarc({ > "mytable2.goodillustrations" => "Other physical details", # 300$b >@@ -38,5 +36,5 @@ is_deeply( \@subfields, [ > 'TransformKohaToMarc should return sorted subfields (regression test for bug 12343)' ); > > # Cleanup >-Koha::Caches->get_instance->clear_from_cache( "MarcSubfieldStructure-" ); >+Koha::Cache->get_instance->clear_from_cache( "MarcSubfieldStructure-" ); > $schema->storage->txn_rollback; >-- >2.11.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 19441
:
67852
|
67853
|
67854
|
67855
|
67856
|
67957
|
68126
|
68127
|
68128
|
68129
|
68130
|
68131