=for comment Documentation generated by YARD v0.6.0 and yard-pod-plugin v0.1.

=head1 NAME

Test::Mini::Logger - Output Logger Base Class

=head1 DESCRIPTION

Whether you're using a tool that expects output in a certain format, or
you just long for the familiar look and feel of another testing
framework, this is what you're looking for.

=head1 METHODS

=head2 Attribute Accessors

=over

=item B<<<< buffer >>>>

    buffer($self) # => IO 


Output buffer.




Returns:

=over

=item *

(I<<<< IO >>>>) -- Output buffer.


=back

=item B<<<< verbose >>>>

    verbose($self) 


Logger verbosity.




Returns:

=over

=item *

Logger verbosity.


=back

=back

=head2 Output Functions

=over

=item B<<<< print >>>>

    print($self, @msg) 


Write output to the L<<<< S<<<<< #buffer >>>>>|Test::Mini::Logger/buffer
>>>>. Lines will be output without added newlines.



Parameters:

=over

=item *

B<<<<< C<<<< @msg >>>> >>>>> -- The message(s) to be printed; will
be handled as per C<<<< print >>>>.


=back

=item B<<<< say >>>>

    say($self, @msg) 


Write output to the L<<<< S<<<<< #buffer >>>>>|Test::Mini::Logger/buffer
>>>>. Lines will be output with appended newlines.



Parameters:

=over

=item *

B<<<<< C<<<< @msg >>>> >>>>> -- The message(s) to be printed;
newlines will be appended to each message, before being passed to
L<<<< S<<<<< #print >>>>>|Test::Mini::Logger/print >>>>.


=back

=back

=head2 Callbacks

=over

=item B<<<< begin_test >>>>

    begin_test($self, $tc, $test) 


Called before each test is run.



Parameters:

=over

=item *

(I<<<< Class >>>>) B<<<<< C<<<< $tc >>>> >>>>> -- The test case
owning the test method.


=item *

(I<<<< String >>>>) B<<<<< C<<<< $test >>>> >>>>> -- The name of the
test method being run.


=back

=item B<<<< begin_test_case >>>>

    begin_test_case($self, $tc, @tests) 


Called before each test case is run.



Parameters:

=over

=item *

(I<<<< Class >>>>) B<<<<< C<<<< $tc >>>> >>>>> -- The test case
being run.


=item *

(I<<<< Array<String> >>>>) B<<<<< C<<<< @tests >>>> >>>>> -- A list
of tests to be run.


=back

=item B<<<< begin_test_suite >>>>

    begin_test_suite($self, %args) 


Called before the test suite is run.



Parameters:

=over

=item *

(I<<<< Hash >>>>) B<<<<< C<<<< %args >>>> >>>>> -- Options the test
suite was run with.


=back







Valid Options for C<%args>:

=over

=item *

(I<<<< String >>>>) B<<<<< filter >>>>> -- Test name filter.


=item *

(I<<<< String >>>>) B<<<<< seed >>>>> -- Randomness seed.


=back

=item B<<<< error >>>>

    error($self, $tc, $test, $e) 


Called when a test dies with an error. Increments the error count.



Parameters:

=over

=item *

(I<<<< Class >>>>) B<<<<< C<<<< $tc >>>> >>>>> -- The test case
owning the test method.


=item *

(I<<<< String >>>>) B<<<<< C<<<< $test >>>> >>>>> -- The name of the
test with an error.


=item *

(I<<<< Test::Mini::Exception >>>>) B<<<<< C<<<< $e >>>> >>>>> -- The
exception object.


=back

=item B<<<< fail >>>>

    fail($self, $tc, $test, $e) 


Called when a test fails. Increments the failure count.



Parameters:

=over

=item *

(I<<<< Class >>>>) B<<<<< C<<<< $tc >>>> >>>>> -- The test case
owning the test method.


=item *

(I<<<< String >>>>) B<<<<< C<<<< $test >>>> >>>>> -- The name of the
failed test.


=item *

(I<<<< Test::Mini::Exception::Assert >>>>) B<<<<< C<<<< $e >>>>
>>>>> -- The exception object.


=back

=item B<<<< finish_test >>>>

    finish_test($self, $tc, $test, $assertions) 


Called after each test is run. Increments the test and assertion counts,
and finalizes the test's timing.



Parameters:

=over

=item *

(I<<<< Class >>>>) B<<<<< C<<<< $tc >>>> >>>>> -- The test case
owning the test method.


=item *

(I<<<< String >>>>) B<<<<< C<<<< $test >>>> >>>>> -- The name of the
test method just run.


=item *

(I<<<< Integer >>>>) B<<<<< C<<<< $assertions >>>> >>>>> -- The
number of assertions called.


=back

=item B<<<< finish_test_case >>>>

    finish_test_case($self, $tc, @tests) 


Called after each test case is run. Increments the test case count, and
finalizes the test case's timing.



Parameters:

=over

=item *

(I<<<< Class >>>>) B<<<<< C<<<< $tc >>>> >>>>> -- The test case just
run.


=item *

(I<<<< Array<String> >>>>) B<<<<< C<<<< @tests >>>> >>>>> -- A list
of tests run.


=back

=item B<<<< finish_test_suite >>>>

    finish_test_suite($self, $exit_code) 


Called after each test suite is run. Finalizes the test suite timing.



Parameters:

=over

=item *

(I<<<< Integer >>>>) B<<<<< C<<<< $exit_code >>>> >>>>> -- Status
the tests finished with.


=back

=item B<<<< pass >>>>

    pass($self, $tc, $test) 


Called when a test passes. Increments the pass count.



Parameters:

=over

=item *

(I<<<< Class >>>>) B<<<<< C<<<< $tc >>>> >>>>> -- The test case
owning the test method.


=item *

(I<<<< String >>>>) B<<<<< C<<<< $test >>>> >>>>> -- The name of the
passing test.


=back

=item B<<<< skip >>>>

    skip($self, $tc, $test, $e) 


Called when a test is skipped. Increments the skip count.



Parameters:

=over

=item *

(I<<<< Class >>>>) B<<<<< C<<<< $tc >>>> >>>>> -- The test case
owning the test method.


=item *

(I<<<< String >>>>) B<<<<< C<<<< $test >>>> >>>>> -- The name of the
skipped test.


=item *

(I<<<< Test::Mini::Exception::Skip >>>>) B<<<<< C<<<< $e >>>> >>>>>
-- The exception object.


=back

=back

=head2 Statistics

=over

=item B<<<< count >>>>

    count # => Hash
    count($key) # => Number


Accessor for counters.



Overloads:


    count # => Hash 

=over


The count hash.




Returns:

=over

=item *

(I<<<< Hash >>>>) -- The count hash.


=back




=back

    count($key) # => Number 

=over


The value for the given key.



Parameters:

=over

=item *

B<<<<< C<<<< $key >>>> >>>>> -- A key in the count hash.


=back


Returns:

=over

=item *

(I<<<< Number >>>>) -- The value for the given key.


=back




=back

=item B<<<< time >>>>

    time($self, $key) # => Number 


Accessor for the timing data.



Parameters:

=over

=item *

B<<<<< C<<<< $key >>>> >>>>> -- The key to look up timings for. 
Typical values are:


=over

=item B<<<<< C<<<< $self >>>>  >>>>>

Time for test suite


=item B<<<<< "TestCase"  >>>>>

Time for the test case


=item B<<<<< "TestCase#test"  >>>>>

Time for the given test


=back

Times for units that have not finished should not be relied upon.


=back


Returns:

=over

=item *

(I<<<< Number >>>>) -- The time taken by the given argument, in
seconds.


=back

=back

=head2 Class Methods

=over

=item B<<<< new >>>>

    new($class, %args) 


Constructor.



Parameters:

=over

=item *

(I<<<< Hash >>>>) B<<<<< C<<<< %args >>>> >>>>> -- Initial state for
the new instance.


=back







Valid Options for C<%args>:

=over

=item *

B<<<<< verbose >>>>> -- Logger verbosity.  Defaults to C<<<<< 0
>>>>>.


=item *

(I<<<< IO >>>>) B<<<<< buffer >>>>> -- Output buffer.  Defaults to
C<<<<< STDOUT >>>>>.


=back

=back

