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


Manual Reference Pages  -  TEST::MINI::TESTCASE (3)

.ds Aq ’

NAME

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

CONTENTS

METHODS

    Class Methods

<B>newB>


    new($class, %args)



Constructor.

Parameters:
o (Hash) <B>B>%args<B>B> — Initial state for the new instance.

Valid Options for %args:
o <B>nameB> — The specific test this instance should run.

    Instance Methods

<B>runB>


    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:
o (Test::Mini::Runner) <B>B>$runner<B>B>

Returns:
o The number of assertions called by this test.

<B>setupB>


    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:
o #teardown

<B>teardownB>


    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:
o #setup

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


perl v5.20.3 TEST::MINI::TESTCASE (3) 2011-02-13

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