NAME
Test::Module::Runnable::Base - See Test::Module::Runnable
DESCRIPTION
This is the base class for Test::Module::Runnable, and all user-documentation must be sought there.
A few internal-only methods are documented here for project maintainers.
ATTRIBUTES
sut
pattern
logger
mocker
PRIVATE ATTRIBUTES
__unique
-
Tracks the counter returned by
unique
. Always contains the previous value returned, or zero before any calls. A hash is used to support multiple domains. __random
-
Hash of random numbers already given out.
METHODS
unique
uniqueStr([$length])
uniqueStrCI($length)
uniqueDomain([$options])
uniqueLetters($length)
methodNames
methodCount
run
debug
mock($class, $method, $return)
- unmock([class], [$method])
mockCalls($class, $method)
mockCallsWithObject($class, $method)
-
See "mockCallsWithObject($class, $method)" in Test::Module::Runnable
clearMocks
USER DEFINED METHODS
setUpBeforeClass
tearDownAfterClass
PROTECTED METHODS
PRIVATE METHODS
__mockCalls
-
Helper method used by "mockCalls($class, $method)" and "mockCallsWithObject($class, $method)".
- __generateMethodName
-
This method returns the current mode of testing the
sut
as defined in a class derived from Test::Module::Runnable, as a string including the current test method, given to this function.If the subclass has not defined
modeName
as a method or attribute, or it isundef
, we return themethodName
passed, unmodified.methodName
-
The name of the method about to be executed. Must be a valid string.
__wrapFail
-
Called within "run" in order to call "BAIL_OUT" in Test::Builder with an appropriate message - it essentially a way to wrap failures from user-defined methods.
As soon as the user-defined method is called, call this method with the following arguments:
$type
-
The name of the user-defined method, for example, 'setUp'
$method
-
The name of the user test method, for example, 'testMyTestMethod'
$fail
-
The exit code from the user-defined method. Not a boolean. If not
EXIT_SUCCESS
,BAIL_OUT
will be called.
There is no return value.
__uniqueStrHelper(@args)
-
Helper method for "uniqueStr([$length])".
__domainPart
-
Helper method used by "uniqueDomain([$options])" to construct a single part of a domain name.
Returns a string.