ePages 7.1.0 - DE_EPAGES/Cartridge/API/Test.pm

Package DE_EPAGES::Cartridge::API::Test

Base class for tests that require a cartridge connection It checks automatically by package name if it is installed

Base
DE_EPAGES::Database::API::Test
Example
package DE_EPAGES::MyCartridge::t::TestName;
use base DE_EPAGES::Cartridge::API::Test;

sub test { # test plan
    my $self = shift;
    $self->test_SubTest();
    done_testing();
}

sub test_SubTest {
    my $self = shift;
    my $SubTestName = (caller(0))[3];

    ok(1,"$SubTestName - tests if something is fine");
    return;
}

__PACKAGE__->runScript();
1;

Functions

preCondition

preCondition

The implementation returns true if the cartridge is installed. do "plan skip all" if the pre condition is not correct

Syntax
$RunTest = $self->preCondition();