View | Details | Raw Unified | Return to bug 23152
Collapse All | Expand All

(-)a/Koha/Schema/Result/AuthHeader.pm (-1 / +1 lines)
Lines 129-135 sub koha_object_class { Link Here
129
    'Koha::Authority';
129
    'Koha::Authority';
130
}
130
}
131
sub koha_objects_class {
131
sub koha_objects_class {
132
    'Koha::Authoritys';
132
    'Koha::Authorities';
133
}
133
}
134
134
135
1;
135
1;
(-)a/Koha/Schema/Result/AuthorisedValueCategory.pm (-1 / +3 lines)
Lines 100-105 __PACKAGE__->has_many( Link Here
100
# Created by DBIx::Class::Schema::Loader v0.07045 @ 2016-08-30 11:59:31
100
# Created by DBIx::Class::Schema::Loader v0.07045 @ 2016-08-30 11:59:31
101
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:6vToj9pUcIv8Jio38rNE4g
101
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:6vToj9pUcIv8Jio38rNE4g
102
102
103
sub koha_objects_class {
104
    'Koha::AuthorisedValueCategories';
105
}
103
106
104
# You can replace this text with custom code or comments, and it will be preserved on regeneration
105
1;
107
1;
(-)a/Koha/Schema/Result/BiblioMetadata.pm (+3 lines)
Lines 136-141 __PACKAGE__->belongs_to( Link Here
136
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:FJk/YOw8Y/QRmmPPL3G5qQ
136
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:FJk/YOw8Y/QRmmPPL3G5qQ
137
137
138
sub koha_object_class {
138
sub koha_object_class {
139
    'Koha::Biblio::Metadata';
140
}
141
sub koha_objects_class {
139
    'Koha::Biblio::Metadatas';
142
    'Koha::Biblio::Metadatas';
140
}
143
}
141
144
(-)a/Koha/Schema/Result/Branch.pm (-1 / +1 lines)
Lines 688-694 sub koha_object_class { Link Here
688
    'Koha::Library';
688
    'Koha::Library';
689
}
689
}
690
sub koha_objects_class {
690
sub koha_objects_class {
691
    'Koha::Librarys';
691
    'Koha::Libraries';
692
}
692
}
693
693
694
1;
694
1;
(-)a/Koha/Schema/Result/Category.pm (-1 / +1 lines)
Lines 273-279 sub koha_object_class { Link Here
273
    'Koha::Patron::Category';
273
    'Koha::Patron::Category';
274
}
274
}
275
sub koha_objects_class {
275
sub koha_objects_class {
276
    'Koha::Patron::Categorys';
276
    'Koha::Patron::Categories';
277
}
277
}
278
278
279
1;
279
1;
(-)a/Koha/Schema/Result/City.pm (-1 / +3 lines)
Lines 85-90 __PACKAGE__->set_primary_key("cityid"); Link Here
85
# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21
85
# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21
86
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:zEjfS65sp13yF7dH8/ojZQ
86
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:zEjfS65sp13yF7dH8/ojZQ
87
87
88
sub koha_objects_class {
89
    'Koha::Cities';
90
}
88
91
89
# You can replace this text with custom content, and it will be preserved on regeneration
90
1;
92
1;
(-)a/Koha/Schema/Result/OpacNews.pm (-1 / +1 lines)
Lines 175-181 sub koha_object_class { Link Here
175
    'Koha::NewsItem';
175
    'Koha::NewsItem';
176
}
176
}
177
sub koha_objects_class {
177
sub koha_objects_class {
178
    'Koha::NewsItems';
178
    'Koha::News';
179
}
179
}
180
180
181
1;
181
1;
(-)a/Koha/Schema/Result/SubscriptionFrequency.pm (-1 / +1 lines)
Lines 115-121 sub koha_object_class { Link Here
115
    'Koha::Subscription::Frequency';
115
    'Koha::Subscription::Frequency';
116
}
116
}
117
sub koha_objects_class {
117
sub koha_objects_class {
118
    'Koha::Subscription::Frequencys';
118
    'Koha::Subscription::Frequencies';
119
}
119
}
120
120
121
1;
121
1;
(-)a/Koha/Schema/Result/Subscriptionhistory.pm (-1 / +1 lines)
Lines 108-114 sub koha_object_class { Link Here
108
    'Koha::Subscription::History';
108
    'Koha::Subscription::History';
109
}
109
}
110
sub koha_objects_class {
110
sub koha_objects_class {
111
    'Koha::Subscription::Historys';
111
    'Koha::Subscription::Histories';
112
}
112
}
113
113
114
1;
114
1;
(-)a/Koha/Schema/Result/TagsIndex.pm (-1 / +1 lines)
Lines 107-113 sub koha_object_class { Link Here
107
    'Koha::Tags::Index';
107
    'Koha::Tags::Index';
108
}
108
}
109
sub koha_objects_class {
109
sub koha_objects_class {
110
    'Koha::Tags::Indexs';
110
    'Koha::Tags::Indexes';
111
}
111
}
112
112
113
1;
113
1;
(-)a/t/db_dependent/TestBuilder.t (-2 / +9 lines)
Lines 383-393 subtest 'build_object() tests' => sub { Link Here
383
            $module =~ s|^.*/(Koha.*)\.pm$|$1|;
383
            $module =~ s|^.*/(Koha.*)\.pm$|$1|;
384
            $module =~ s|/|::|g;
384
            $module =~ s|/|::|g;
385
            next if $module eq 'Koha::Objects';
385
            next if $module eq 'Koha::Objects';
386
            eval "require $module";;
386
            eval "require $module";
387
            my $object = $builder->build_object( { class => $module } );
387
            my $object = $builder->build_object( { class => $module } );
388
            is( ref($object), $module->object_class, "Testing $module" );
388
            is( ref($object), $module->object_class, "Testing $module" );
389
            eval {$object->get_from_storage};
389
            eval {$object->get_from_storage};
390
            is( $@, '', "Module $module should have koha_object[s]_class method if needed" );
390
            is( $@, '', "Module $module should have koha_object[s]_class method if needed" );
391
392
            # Testing koha_object_class and koha_objects_class
393
            my $object_class =  Koha::Object::_get_object_class($object->_result->result_class);
394
            eval "require $object_class";
395
            is( $@, '', "Module $object_class should be defined");
396
            my $objects_class = Koha::Objects::_get_objects_class($object->_result->result_class);
397
            eval "require $objects_class";
398
            is( $@, '', "Module $objects_class should be defined");
391
        }
399
        }
392
    };
400
    };
393
401
394
- 

Return to bug 23152