PHP 클래스 Kraken\_Unit\Supervision\SupervisorTest

상속: extends Kraken\Test\TUnit
파일 보기 프로젝트 열기: kraken-php/framework

공개 메소드들

메소드 설명
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 ( )

메소드 상세

createSolver() 공개 메소드

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

createSupervisor() 공개 메소드

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
리턴 Kraken\Supervision\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() 공개 메소드