Package DE_EPAGES::Database::API::Test
Base class for tests that require a database connection
Example |
package MyTest; use base DE_EPAGES::Database::API::Test; use Test::More tests => 1; sub test { my $self = shift; my $dbi = $self->dbi; ok( 1, 'selftest' ); } sub init { my $self = shift; my $dbi = $self->dbi; } sub cleanup { my $self = shift; my $dbi = $self->dbi; } __PACKAGE__->runScript; 1; |
Functions
dbi
Returns the current global database handle.
Syntax |
$dbi = $Test->dbi; |
Return |
|
run
Connects to the test database ($ENV{EPAGES_TESTSITE}) and runs the test case using $self->DE_EPAGES::Database::API::Test::run.
Syntax |
$Test->run; |