GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Test::Mini::TestCase(3) User Contributed Perl Documentation Test::Mini::TestCase(3)

Test::Mini::TestCase - Base class for Test::Mini test cases

new
    new($class, %args)
    

Constructor.

Parameters:

(Hash) %args -- Initial state for the new instance.

Valid Options for %args:

name -- The specific test this instance should run.

run
    run
    

Runs the test specified at construction time. This method is responsible for invoking the setup and teardown advice for the method, in addition to ensuring that any fatal errors encountered by the program are suitably handled. Appropriate diagnostic information should be sent to the supplied $runner.

Parameters:

(Test::Mini::Runner) $runner

Returns:

The number of assertions called by this test.
setup
    setup($self)
    

Test setup behavior, automatically invoked prior to each test. Intended to be overridden by subclasses.

Examples:

    package TestSomething;
    use base 'Test::Mini::TestCase';
    
    use Something;
    
    sub setup { $obj = Something->new(); }
    
    sub test_can_foo {
        assert_can($obj, 'foo');
    }
    

See Also:

#teardown
teardown
    teardown($self)
    

Test teardown behavior, automatically invoked following each test. Intended to be overridden by subclasses.

Examples:

    package Test;
    use base 'Test::Mini::TestCase';
    
    sub teardown { unlink 'foo.bar' }
    
    sub test_touching_files {
        `touch foo.bar`;
        assert(-f 'foo.bar');
    }
    

See Also:

#setup
2011-02-13 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.