http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14639

Marcel de Rooy <m.de.r...@rijksmuseum.nl> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #41386|0                           |1
        is obsolete|                            |

--- Comment #12 from Marcel de Rooy <m.de.r...@rijksmuseum.nl> ---
Created attachment 42312
  -->
http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=42312&action=edit
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 <mtomp...@hotmail.com>

Signed-off-by: Marcel de Rooy <m.de.r...@rijksmuseum.nl>

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to