Package DE_EPAGES::Shop::API::Test
Base class for tests that require a shop
Base |
DE_EPAGES::Database::API::Test |
Example |
package MyTest; use base DE_EPAGES::Shop::API::Test; use Test::More tests => 1; sub test { my $self = shift; my $Shop = $self->shop; ok( 1, 'selftest' ); } sub init { #optional my $self = shift; $self->SUPER::init; # creates the shop my $Shop = $self->shop; } sub cleanup { # optional my $self = shift; my $Shop = $self->shop; $self->SUPER::cleanup; # deletes the shop } __PACKAGE__->runScript; 1; |
Functions
cleanup
Deletes the test shop unless the environment variable SKIP_CLEANUP is true.
Syntax |
$Test->cleanup; |
init
Creates a new test shop unless the test shop already exists and the environment variable SKIP_CLEANUP is true.
Syntax |
$Test->init; |
shop
Returns the test shop object.
Syntax |
$Shop = $Test->shop; |
Return |
|