PHP Class Cascade\Tests\Config\Loader\ClassLoader\HandlerLoaderTest

Author: Raphael Antonmattei ([email protected])
Inheritance: extends PHPUnit_Framework_TestCase
Afficher le fichier Open project: theorchard/monolog-cascade

Méthodes publiques

Méthode Description
handlerParamsProvider ( ) : array Data provider for testHandlers !\ Important note: Just add values to this array if you need to test a newly added handler
testHandlerForProcessor ( ) Test extra option processor handler
testHandlerLoader ( )
testHandlerLoaderWithInvalidFormatter ( )
testHandlerLoaderWithInvalidHandler ( )
testHandlerLoaderWithInvalidHandlers ( )
testHandlerLoaderWithInvalidProcessor ( )
testHandlerLoaderWithNoOptions ( )
testHandlers ( string $class, string $optionName, mixed $optionValue, string $calledMethodName ) Test the extra option handlers
testHandlersExist ( ) Test that handlers exist
testReplacesHandlerNamesInOptionsArrayWithLoadedCallable ( )

Private Methods

Méthode Description
doTestMethodCalledInHandler ( string $class, string $methodName, mixed $methodArg, Closure $closure ) Tests that calling the given Closure will trigger a method call with the given param in the given class
getHandler ( string $class, string $optionName ) : Closure Check if the handler exists for a given class and option Also checks that it a callable and return it

Method Details

handlerParamsProvider() public méthode

If one of your handlers calls more than one method you can add more than one entries
public handlerParamsProvider ( ) : array
Résultat array of array of args for testHandlers

testHandlerForProcessor() public méthode

Test extra option processor handler

testHandlerLoader() public méthode

public testHandlerLoader ( )

testHandlerLoaderWithInvalidFormatter() public méthode

testHandlerLoaderWithInvalidHandler() public méthode

testHandlerLoaderWithInvalidHandlers() public méthode

testHandlerLoaderWithInvalidProcessor() public méthode

testHandlerLoaderWithNoOptions() public méthode

testHandlers() public méthode

Test the extra option handlers
public testHandlers ( string $class, string $optionName, mixed $optionValue, string $calledMethodName )
$class string Class name
$optionName string Option name
$optionValue mixed Option value
$calledMethodName string Expected called method name

testHandlersExist() public méthode

Test that handlers exist
public testHandlersExist ( )

testReplacesHandlerNamesInOptionsArrayWithLoadedCallable() public méthode