line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package CHI::Driver::HandlerSocket::t::CHIDriverTests::MySQLHandlerSocket; |
2
|
1
|
|
|
1
|
|
718
|
use strict; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
27
|
|
3
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
28
|
|
4
|
|
|
|
|
|
|
|
5
|
1
|
|
|
1
|
|
5
|
use base qw(CHI::Driver::HandlerSocket::t::CHIDriverTests::Base); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
685
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
sub testing_driver_class { 'CHI::Driver::HandlerSocket' } |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
sub required_modules { |
10
|
|
|
|
|
|
|
return { 'DBD::mysql' => undef, 'Net::HandlerSocket' => undef, } |
11
|
|
|
|
|
|
|
} |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
our $dbh; |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
sub runtests { |
16
|
|
|
|
|
|
|
my $class = shift; |
17
|
|
|
|
|
|
|
my %opts = @_; |
18
|
|
|
|
|
|
|
$dbh = DBI->connect("DBI:mysql:database=$opts{database};host=localhost", $opts{user}, $opts{pass}) or |
19
|
|
|
|
|
|
|
die "failed to connect to database: $DBI::errstr"; |
20
|
|
|
|
|
|
|
$class->SUPER::runtests(); |
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
sub dbh { return $dbh; } |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
sub cleanup : Tests( shutdown ) { |
26
|
|
|
|
|
|
|
# unlink 't/dbfile.db'; |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
1; |