Lines 395-402
subtest 'build_object() tests' => sub {
Link Here
|
395 |
eval "require $module"; |
395 |
eval "require $module"; |
396 |
my $object = $builder->build_object( { class => $module } ); |
396 |
my $object = $builder->build_object( { class => $module } ); |
397 |
is( ref($object), $module->object_class, "Testing $module" ); |
397 |
is( ref($object), $module->object_class, "Testing $module" ); |
398 |
eval {$object->get_from_storage}; |
398 |
if ( $module ne 'Koha::Old::Patrons' ) { # FIXME deletedborrowers does not have a PK |
399 |
is( $@, '', "Module $module should have koha_object[s]_class method if needed" ); |
399 |
eval {$object->get_from_storage}; |
|
|
400 |
is( $@, '', "Module $module should have koha_object[s]_class method if needed" ); |
401 |
} |
400 |
|
402 |
|
401 |
# Testing koha_object_class and koha_objects_class |
403 |
# Testing koha_object_class and koha_objects_class |
402 |
my $object_class = Koha::Object::_get_object_class($object->_result->result_class); |
404 |
my $object_class = Koha::Object::_get_object_class($object->_result->result_class); |