Koha/t
Tomas Cohen Arazi 7587e7c752 Bug 14639: (regression tests) Extend Koha::MetadataRecord to handle serialization format and record id
In order to use Koha::MetadataRecord as a container for moving records
around it is important to let it carry the serialization format
of the record object it was built with, so it is easier and cheaper to
make decisions about records.

This patch introduces regression tests for the changes to be made.
The 'format' param is introduced, and also sets default values:
  schema => 'marc21'
  format => 'MARC'

A new (optional) 'id' param is added so the record carries its own id outside
of it.

The default behaviour is preserved, and no changes are needed in places
Koha::MetadataRecord is used.
->new also returns undef if no record is passed, and raises a carped warning.

To test:
- Apply this test patch
- Run the new tests
  $ prove t/Koha_MetadataRecord.t
=> FAIL: Tests shoud fail as the changes are not implemented on Koha::MetadataRecord

Edit: made serialization format be upper-case to match what is used on Koha::Filter's

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-09-07 12:06:21 -03:00
..
Acquisition
Biblio Bug 11247: Improve tests 2015-09-02 14:36:33 -03:00
Budgets
Circulation Bug 13106 - Encapsulate Circulation::GetAgeRestriction() and modify it to check borrowers age as well. 2014-11-11 09:52:59 -03:00
DataTables
db_dependent Bug 14702: Unit tests for GetReserveFee and ChargeReservesFee 2015-09-07 12:04:49 -03:00
External Bug 14147: Add unit tests to C4::External::OverDrive 2015-05-14 11:11:58 -03:00
Koha/Plugin Bug 12412: Add ability for plugins to convert arbitrary files to MARC from record staging tool 2015-05-04 15:33:51 -03:00
lib Bug 14256: (follow-up) Check for unique constraint to regenerate random data 2015-06-10 12:47:07 -03:00
Members
Number Bug 12844: Force the symbol place in the tests 2014-10-27 12:56:30 -03:00
Search
Serials
00-checkdatabase-version.t Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00
00-deprecated.t
00-load.t Bug 7904 Change SIP modules to use standard LIB path 2015-02-05 14:44:54 -03:00
00-merge-conflict-markers.t Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00
00-testcritic.t
00-valid-xml.t Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00
Auth_with_shibboleth.t Bug 14111 - More t/Auth_with_shibboleth.t silencing 2015-06-04 10:12:03 -03:00
AuthoritiesMarc_MARC21.t
AuthoritiesMarc_UNIMARC.t
AuthUtils.t
Barcodes_annual.t
Barcodes_EAN13.t
Barcodes_hbyymmincr.t
Barcodes_incremental.t
Barcodes_ValueBuilder.t
Biblio.t Bug 14346: t/Biblio.t fails because of new warning 2015-06-07 18:37:32 -03:00
Bookseller.t
Boolean.t Bug 13814: (QA followup) test for generated warnings 2015-03-15 09:03:33 -03:00
Borrower.t Bug 13882: Tidy t/Borrower.t to fix whitespace errors 2015-04-08 12:19:15 -03:00
Branch.t
Breeding.t Bug 13279: t/Breeding.t shouldn't depend on the DB 2014-11-20 09:39:53 -03:00
Budgets.t
Cache.t
Calendar.t
Charset.t Bug 14112: Silence warnings in t/Charset.t 2015-05-27 14:32:41 -03:00
Circulation_barcodedecode.t Bug 10900 - Incorrect calling conventions accessing C4::Context 2015-02-09 17:00:13 -03:00
ClassSortRoutine.t
ClassSortRoutine_Dewey.t Bug 8837 [QA Followup] - Add unit tests 2014-10-28 09:39:44 -03:00
ClassSortRoutine_Generic.t
ClassSortRoutine_LCC.t
ClassSource.t
Context.t
Contract.t
Creators.t Bug 14602: Fix failing t/Creators.t test 2015-09-07 11:39:47 -03:00
Dates.t Bug 14113: Silence t/Dates.t warnings and cleanup output. 2015-06-01 14:13:54 -03:00
DateUtils.t Bug 13933: Fix t/DateUtils.t without DB 2015-04-01 13:10:16 -03:00
Debug.t Bug 14114: Silence warns and cleanup t/Debug.t 2015-05-22 09:33:34 -03:00
dummy.t
External_Syndetics.t
Form_MessagingPreferences.t
Heading.t
Images.t
ImportBatch.t Bug 13281: t/ImportBatch.t shouldn't depend on the DB 2014-11-20 09:53:36 -03:00
Installer_PerlDependencies.t
Installer_PerlModules.t
Installer_pm.t
ItemCirculationAlertPreference.t
ItemType.t Bug 13934: C4::ItemType->get should return undef if no parameter given 2015-04-10 10:18:07 -03:00
Koha.t Bug 14200: Regression tests 2015-05-19 09:45:04 -03:00
Koha_Email.t Bug 13172 t/Koha_Email.t was database dependent 2014-10-31 12:10:32 -03:00
Koha_MetadataRecord.t Bug 14639: (regression tests) Extend Koha::MetadataRecord to handle serialization format and record id 2015-09-07 12:06:21 -03:00
Koha_Template_Plugin_Cache.t
Koha_Template_Plugin_Koha.t Bug 13758: (QA followup) revert case change that broke the tests 2015-05-07 14:12:14 -03:00
Koha_Util_FrameworkPlugin.t Bug 13437: Preliminary changes for marc21 plugins field 008 2015-06-10 12:51:26 -03:00
Koha_Util_MARC.t Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00
Labels.t Bug 9978: (followup) Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:43 -03:00
Labels_split_ccn.t Bug 9978: (followup) Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:43 -03:00
Labels_split_ddcn.t Bug 9978: (followup) Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:43 -03:00
Labels_split_lccn.t Bug 9978: (followup) Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:43 -03:00
Languages.t Bug 11944: use CGI( -utf8 ) everywhere 2015-01-13 13:07:21 -03:00
Letters.t Bug 13601: t/Letters.t needs to mock the dateformat pref 2015-03-30 13:40:05 -03:00
Log.t
Logger.t Bug 14167: (QA followup) use warn instead of just STDERR 2015-07-21 10:50:17 -03:00
Matcher.t
Members_Attributes.t
Members_AttributeTypes.t
Members_Messaging.t
Message.t Bug 13282: t/Message.t shouldn't depend on the DB 2014-11-20 09:38:02 -03:00
NorwegianPatronDB.t Bug 11401: (followup) make tests run on absent deps 2014-11-14 15:32:25 -03:00
Output.t Bug 11944: use CGI( -utf8 ) everywhere 2015-01-13 13:07:21 -03:00
Output_JSONStream.t
Overdues.t Bug 13283: t/Overdues.t shouldn't depend on the DB 2014-11-20 09:37:39 -03:00
Patroncards.t
Patroncards_Batch.t
Patroncards_Layout.t
Patroncards_Lib.t
Patroncards_Patroncard.t
Patroncards_Profile.t
Patroncards_Template.t
perlcriticrc
Prices.t Bug 12976: Fix some comment in tests 2015-02-19 09:46:44 -03:00
Print.t
QueryParser.t
RecordProcessor.t Bug 14646: (regression test) Koha::RecordProcessor only accepts one filter at a time 2015-08-20 13:44:15 -03:00
Review.t
Ris.t
RotatingCollections.t Bug 13284: t/RotatingCollections.t shouldn't depend on the DB 2014-11-20 09:37:20 -03:00
Scheduler.t
Scrubber.t Bug 14116: Silence noisy output for t/Scrubber. 2015-06-01 14:10:56 -03:00
Search.t Bug 13278: (QA followup) use t::lib::Mocks 2014-11-19 18:11:58 -03:00
Search_PazPar2.t Bug 14117: Silence warnings t/SearchPazPar2.t 2015-06-01 14:10:14 -03:00
SimpleMARC.t Bug 14098: Implement the copy_and_replace action for MTT 2015-09-07 11:17:13 -03:00
SIP_Sip.t Bug 7904 Change SIP modules to use standard LIB path 2015-02-05 14:44:54 -03:00
smolder_smoke_signal
SMS.t
SocialData.t
Stats.t
SuggestionEngine.t
SuggestionEngine_AuthorityFile.t Bug 13277: (QA followup) use t::lib::Mocks 2014-11-19 18:12:03 -03:00
TmplToken.t
XSLT.t Bug 13276: use t::lib::Mocks::mock_dbh 2014-11-19 11:30:45 -03:00