Bug 14059: Testing C4::Creators::Lib
Testing C4::Creators::Lib at 100% Deleting get_column_names subroutine (never used) TEST PLAN --------- 1. Apply patch 2. prove -v t/db_dependent/Creators/Lib.t -- All 644 tests should run successfully without any error or warning TEST PLAN OPTIONAL ------------------ Check with bug 13899 to see the coverage of this module. Coverage BEFORE this patch : Statement : 11,6% Branch : 0,0% Condition : N/A Subroutine : 36,0% Coverage AFTER this patch : Statement : 100,0% Branch : 100,0% Condition : N/A Subroutine : 100,0% Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
parent
cc4aaf891b
commit
5c7b3aa8d1
2 changed files with 1447 additions and 16 deletions
|
@ -443,22 +443,6 @@ sub get_output_formats {
|
|||
return $output_formats;
|
||||
}
|
||||
|
||||
=head2 C4::Creators::Lib::get_column_names($table_name)
|
||||
|
||||
Return an arrayref of an array containing the column names of the supplied table.
|
||||
|
||||
=cut
|
||||
|
||||
sub get_column_names {
|
||||
my $table = shift;
|
||||
my $dbh = C4::Context->dbh();
|
||||
my $column_names = [];
|
||||
my $sth = $dbh->column_info(undef,undef,$table,'%');
|
||||
while (my $info = $sth->fetchrow_hashref()){
|
||||
$$column_names[$info->{'ORDINAL_POSITION'}] = $info->{'COLUMN_NAME'};
|
||||
}
|
||||
return $column_names;
|
||||
}
|
||||
|
||||
=head2 C4::Creators::Lib::get_table_names($search_term)
|
||||
|
||||
|
|
1447
t/db_dependent/Creators/Lib.t
Normal file
1447
t/db_dependent/Creators/Lib.t
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue