Koha/t/db_dependent/lib/KohaTest/Items.pm
Paul Poulain 49b167e848 Bug 6875 de nesting C4::Biblio
C4::Biblio is used in many many places. The goal of this cleaning is to do from C4::Biblio a package with as many dependancies as possible.

* C4::Heading is called only in 1 place, highly rarely used (only in 1 misc/link_bibs_to_authorities.pl), moving to require
* PrepareItemrecordDisplay is a sub that is more related to Items, moving it here. It means some scripts that used this sub must be checked against use C4::Items
* C4::Items is needed in EmbedItemsInMarcBiblio, moving it only in this sub, and switching to require
* 2 subs are totally useless z3950_extended_services and set_service_options, removing them

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
No test plan included, but tested some opac and cataloging functions.
Code looks good. Marked as Passed QA.
2012-02-20 16:35:17 +01:00

61 lines
1.3 KiB
Perl

package KohaTest::Items;
use base qw( KohaTest );
use strict;
use warnings;
use Test::More;
use C4::Items;
sub testing_class { 'C4::Items' }
sub methods : Test( 1 ) {
my $self = shift;
my @methods = qw(
GetItem
AddItemFromMarc
AddItem
AddItemBatchFromMarc
ModItemFromMarc
ModItem
ModItemTransfer
ModDateLastSeen
DelItem
CheckItemPreSave
GetItemStatus
GetItemLocation
GetLostItems
GetItemsForInventory
GetItemsCount
GetItemInfosOf
GetItemsByBiblioitemnumber
GetItemsInfo
get_itemnumbers_of
GetItemnumberFromBarcode
get_item_authorised_values
get_authorised_value_images
GetMarcItem
_set_derived_columns_for_add
_set_derived_columns_for_mod
_do_column_fixes_for_mod
_get_single_item_column
_calc_items_cn_sort
_set_defaults_for_add
_koha_new_item
_koha_modify_item
_koha_delete_item
_marc_from_item_hash
_add_item_field_to_biblio
_replace_item_field_in_biblio
_repack_item_errors
_get_unlinked_item_subfields
_get_unlinked_subfields_xml
_parse_unlinked_item_subfields_from_xml
PrepareItemrecordDisplay
);
can_ok( $self->testing_class, @methods );
}
1;