ePages 7.25.0 - DE_EPAGES/Shop/API/TestImportXML.pm

Package DE_EPAGES::Shop::API::TestImportXML

Base
DE_EPAGES::Shop::API::Test
Example
package DE_EPAGES::YourCartridge::t::TestName;
use base DE_EPAGES::Shop::API::TestImportXML;
use Test::More;
use strict;

sub shopAlias {
    return 'ShopAliasInTheXMLFile';
}

sub importXMLPath {
    return 'RelativePath/ShopXMLs.xml';
}

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();

Functions

importXMLPath
init
testFolder

importXMLPath

Can be overriden in Sub classes to set the path of the import XMLs

Syntax
importXMLPath( );

init

add after the SUPER::init() call a Shop which is generated by a import xml file

Syntax
init( );

testFolder

The Default implementation always returns a unique Test folder name which is searchable in the diagnostic. like: YourCartridgeName_TestFileName_53FAEB01AC150407E186

Syntax
testFolder( );
Return
$UniqueFolderName (String)
unique folder name