PHP Class Kraken\_Unit\Supervision\SupervisorTest

Inheritance: extends Kraken\Test\TUnit
Datei anzeigen Open project: kraken-php/framework

Public Methods

Method Description
createSolver ( string[] | null $methods = null ) : Kraken\Supervision\SolverInterface | PHPUnit_Framework_MockObject_MockObject
createSupervisor ( mixed[] $params = [], Kraken\Supervision\SolverInterface[] $rules = [], mixed[] | null $methods = null ) : Supervisor | PHPUnit_Framework_MockObject_MockObject
testApiConstructor_CreatesInstance ( )
testApiDestructor_DoesNotThrowException ( )
testApiExistsParam_ReturnsFalse_WhenParamDoesNotExist ( )
testApiExistsParam_ReturnsTrue_WhenParamDoesExist ( )
testApiExistsSolver_ReturnsFalse_WhenHandlerDoesNotExist ( )
testApiExistsSolver_ReturnsTrue_WhenHandlerDoesExist ( )
testApiGetParam_ReturnsNull_WhenParamDoesNotExist ( )
testApiGetParam_ReturnsParam_WhenParamDoesExist ( )
testApiGetSolver_ReturnsHandler_WhenHandlerDoesExist ( )
testApiGetSolver_ReturnsNull_WhenHandlerDoesNotExist ( )
testApiInvoke_CallsHandleMethod ( )
testApiRemoveParam_DoesNothing_WhenParamDoesNotExist ( )
testApiRemoveParam_RemovesParam_WhenParamDoesExist ( )
testApiRemoveSolver_DoesNothing_WhenHandlerDoesNotExist ( )
testApiRemoveSolver_RemovesHandler_WhenHandlerDoesExist ( )
testApiResolveHandler_ResolvesHandler_WhenHandlerDoesExistInsideFactory ( )
testApiResolveHandler_ReturnsImmediately_WhenConcreteHandlerPassed ( )
testApiResolveHandler_ThrowsException_WhenHandlerDoesNotExistInsideFactory ( )
testApiSetParam_SetsParam ( )
testApiSetSolver_AcceptsHandler_WhenConcreteHandlerIsPassed ( )
testApiSetSolver_ResolvesHandler_WhenPassedMixedArgumentsArray ( )
testApiSetSolver_ResolvesHandler_WhenPassedMultipleNamesOfExistingHandlers ( )
testApiSetSolver_ResolvesHandler_WhenPassedNameOfExistingHandler ( )
testApiSetSolver_ThrowsException_WhenAtLeastOneHandlerIsInvalid ( )
testApiSolve_HandlesException_UsingFirstValidHandler ( )
testApiSolve_RejectsPromise_WhenNoValidExceptionFound ( )

Method Details

createSolver() public method

public createSolver ( string[] | null $methods = null ) : Kraken\Supervision\SolverInterface | PHPUnit_Framework_MockObject_MockObject
$methods string[] | null
return Kraken\Supervision\SolverInterface | PHPUnit_Framework_MockObject_MockObject

createSupervisor() public method

public createSupervisor ( mixed[] $params = [], Kraken\Supervision\SolverInterface[] $rules = [], mixed[] | null $methods = null ) : Supervisor | PHPUnit_Framework_MockObject_MockObject
$params mixed[]
$rules Kraken\Supervision\SolverInterface[]
$methods mixed[] | null
return Kraken\Supervision\Supervisor | PHPUnit_Framework_MockObject_MockObject

testApiConstructor_CreatesInstance() public method

testApiDestructor_DoesNotThrowException() public method

testApiExistsParam_ReturnsFalse_WhenParamDoesNotExist() public method

testApiExistsParam_ReturnsTrue_WhenParamDoesExist() public method

testApiExistsSolver_ReturnsFalse_WhenHandlerDoesNotExist() public method

testApiExistsSolver_ReturnsTrue_WhenHandlerDoesExist() public method

testApiGetParam_ReturnsNull_WhenParamDoesNotExist() public method

testApiGetParam_ReturnsParam_WhenParamDoesExist() public method

testApiGetSolver_ReturnsHandler_WhenHandlerDoesExist() public method

testApiGetSolver_ReturnsNull_WhenHandlerDoesNotExist() public method

testApiInvoke_CallsHandleMethod() public method

testApiRemoveParam_DoesNothing_WhenParamDoesNotExist() public method

testApiRemoveParam_RemovesParam_WhenParamDoesExist() public method

testApiRemoveSolver_DoesNothing_WhenHandlerDoesNotExist() public method

testApiRemoveSolver_RemovesHandler_WhenHandlerDoesExist() public method

testApiResolveHandler_ResolvesHandler_WhenHandlerDoesExistInsideFactory() public method

testApiResolveHandler_ReturnsImmediately_WhenConcreteHandlerPassed() public method

testApiResolveHandler_ThrowsException_WhenHandlerDoesNotExistInsideFactory() public method

testApiSetParam_SetsParam() public method

testApiSetSolver_AcceptsHandler_WhenConcreteHandlerIsPassed() public method

testApiSetSolver_ResolvesHandler_WhenPassedMixedArgumentsArray() public method

testApiSetSolver_ResolvesHandler_WhenPassedMultipleNamesOfExistingHandlers() public method

testApiSetSolver_ResolvesHandler_WhenPassedNameOfExistingHandler() public method

testApiSetSolver_ThrowsException_WhenAtLeastOneHandlerIsInvalid() public method

testApiSolve_HandlesException_UsingFirstValidHandler() public method

testApiSolve_RejectsPromise_WhenNoValidExceptionFound() public method