« test_lib/DB/Introspector/RelInspectTest.pm
↑ Summary
blib/lib/DB/Introspector/Base/FunctionalIndex.pm »
| 1 | package DB::IntrospectorTest; | ||
| 2 | |||
| 3 | 1 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | |||
| 5 | 1 | ▶ | use base qw( DB::IntrospectorBaseTest ); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | |||
| 7 | 1 | ▶ | use DBI; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 8 | |||
| 9 | |||
| 10 | 0 | ▶ | sub test_find_table { |
|
Subroutine
test_find_table: not called CC=1 SCAR=6.9
Pod
undocumented
| |||
| 11 | 0 | my $self = shift; | |
| 12 | 0 | my $table_name = 'UsErS'; | |
| 13 | |||
| 14 | 0 | my $table = $self->_introspector->find_table($table_name); | |
| 15 | |||
| 16 | 0 | $self->assert( defined $table, "table: $table_name not found" ); | |
| 17 | 0 | $self->assert( UNIVERSAL::isa($table, 'DB::Introspector::Base::Table') ); | |
| 18 | 0 | $self->assert( lc($table->name) eq lc($table_name) ); | |
| 19 | 0 | return 1; | |
| 20 | } | ||
| 21 | |||
| 22 | |||
| 23 | |||
| 24 | { | ||
| 25 | 1 | my %tables = ( | |
| 26 | 'users' => 1, | ||
| 27 | 'groups' => 1, | ||
| 28 | 'grouped_users' => 1, | ||
| 29 | 'grouped_user_images' => 1 | ||
| 30 | ); | ||
| 31 | 0 | ▶ | sub test_find_all_tables { |
|
Subroutine
test_find_all_tables: not called CC=2 SCAR=17.9
Pod
undocumented
| |||
| 32 | 0 | my $self = shift; | |
| 33 | 0 | my @tables = $self->_introspector->find_all_tables(); | |
| 34 | |||
| 35 | 0 | foreach my $table (@tables) { | |
| 36 | 0 | $self->assert(defined $tables{ lc($table->name) }); | |
| 37 | } | ||
| 38 | } | ||
| 39 | } | ||
| 40 | |||
| 41 | |||
| 42 | |||
| 43 | 1 | 1; | |