Zonemaster::Engine::Test::Basic(3p)

NAME
Zonemaster::Engine::Test::Basic - Module implementing tests focused on basic zone functionality

SYNOPSIS
    my @results = Zonemaster::Engine::Test::Basic->all( $zone );

METHODS

all()
        my @logentries = Zonamester::Engine::Test::Basic->all( $zone );

    Runs the test cases in the Basic test module. A test is skipped if it is not included in "test_cases" in Zonemaster::Engine::Profile or if a previous test case has found a condition that renders it superfluous.

    Takes a Zonemaster::Engine::Zone object.

    Returns a list of Zonemaster::Engine::Logger::Entry objects.

can_continue()
        my $bool = can_continue( $zone, @logentry_array );

    Determines if further evaluation of the given zone is possible based on the results from the Basic Test Cases.

    Takes a Zonemaster::Engine::Zone object and an array of Zonemaster::Engine::Logger::Entry objects.

    Returns a boolean.

metadata()
        my $hash_ref = metadata();

    Returns a reference to a hash, the keys of which are the names of all Test Cases in the module, and the corresponding values are references to an array containing all the message tags that the Test Case can use in log entries.

tag_descriptions()
        my $hash_ref = tag_descriptions();

    Used by the built-in translation system.

    Returns a reference to a hash, the keys of which are the message tags and the corresponding values are strings (message IDs).

version()
        my $version_string = version();

    Returns a string containing the version of the current module.

INTERNAL METHODS

_emit_log()
        my $log_entry = _emit_log( $message_tag_string, $hash_ref );

    Adds a message to the logger for this module. See "add($tag, $argref, $module, $testcase)" in Zonemaster::Engine::Logger::Entry for more details.

    Takes a string (message tag) and a reference to a hash (arguments).

    Returns a Zonemaster::Engine::Logger::Entry object.

_ip_disabled_message()
        my $bool = _ip_disabled_message( $logentry_array_ref, $ns, @query_type_array );

    Checks if the IP version of a given name server is allowed to be queried. If not, it adds a logging message and returns true. Else, it returns false. Used in Test Cases in combination with _ip_enabled_message().

    Takes a reference to an array of Zonemaster::Engine::Logger::Entry objects, a Zonemaster::Engine::Nameserver object and an array of strings (query type).

    Returns a boolean.

_ip_enabled_message()
        _ip_enabled_message( $array_ref, $ns, @query_type_array );

    Adds a logging message if the IP version of a given name server is allowed to be queried. Used in Test Cases in combination with _ip_disabled_message().

    Takes a reference to an array of Zonemaster::Engine::Logger::Entry objects, a Zonemaster::Engine::Nameserver object and an array of strings (query type).

TESTS

basic01()
        my @logentry_array = basic01( $zone );

    Runs the Basic01 Test Case <https://github.com/zonemaster/zonemaster/blob/master/docs/public/specifications/tests/Basic-TP/basic01.md>.

    Takes a Zonemaster::Engine::Zone object.

    Returns a list of Zonemaster::Engine::Logger::Entry objects.

basic02()
        my @logentry_array = basic02( $zone );

    Runs the Basic02 Test Case <https://github.com/zonemaster/zonemaster/blob/master/docs/public/specifications/tests/Basic-TP/basic02.md>.

    Takes a Zonemaster::Engine::Zone object.

    Returns a list of Zonemaster::Engine::Logger::Entry objects.

basic03()
        my @logentry_array = basic03( $zone );

    Runs the Basic03 Test Case <https://github.com/zonemaster/zonemaster/blob/master/docs/public/specifications/tests/Basic-TP/basic03.md>.

    Takes a Zonemaster::Engine::Zone object.

    Returns a list of Zonemaster::Engine::Logger::Entry objects.