PHP 클래스 Kraken\_Unit\Network\Http\Component\Router\HttpRouterTest

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

공개 메소드들

메소드 설명
createComponent ( ) : Kraken\Network\NetworkComponentInterface | PHPUnit_Framework_MockObject_MockObject
createMatcher ( string[] | null $methods = [] ) : Symfony\Component\Routing\Matcher\UrlMatcher | PHPUnit_Framework_MockObject_MockObject
createRouter ( Kraken\Network\NetworkComponentAwareInterface $aware, string[] | null $methods = null, mixed[] $params = [] ) : HttpRouter | PHPUnit_Framework_MockObject_MockObject
createServer ( string[] | null $methods = [] ) : Kraken\Network\NetworkComponentAwareInterface | PHPUnit_Framework_MockObject_MockObject
testApiAddRoute_AddsRoute_WhenRouteDoesNotExist ( )
testApiAddRoute_ReplacesRoute_WhenRouteDoesExist ( )
testApiAllowOrigin_BlocksAddress ( )
testApiConstructor_CreatesInstance ( )
testApiDestructor_DoesNotThrowException ( )
testApiDisallowOrigin_UnblocksAddress ( )
testApiExistsRoute_ReturnsFalse_WhenRouteDoesNotExist ( )
testApiExistsRoute_ReturnsTrue_WhenRouteDoesExist ( )
testApiGetAllowedOrigins ( )
testApiHandleConnect_DoesNothing ( )
testApiHandleDisconnect_DoesNothing_WhenConnectionControllerDoesNotExist ( )
testApiHandleDisconnect_PropagatesDisconnection_WhenConnectionControllerDoesExist ( )
testApiHandleError_ClosesConnectionWithCode500_WhenConnectionControllerDoesExistButThrowsException ( )
testApiHandleError_ClosesConnectionWithCode500_WhenConnectionControllerDoesNotExist ( )
testApiHandleError_PropagatesErrorToController_WhenConnectionControllerDoesExist ( )
testApiHandleMessage_ClosesConnectionWithCode403_WhenHttpRequestReceived_ButMatcherThrowsMethodNotAllowedException ( )
testApiHandleMessage_ClosesConnectionWithCode403_WhenHttpRequestReceived_ButOriginIsNotAllowed ( )
testApiHandleMessage_ClosesConnectionWithCode404_WhenHttpRequestReceived_ButMatcherThrowsResourceNotFoundException ( )
testApiHandleMessage_ClosesConnectionWithCode500_WhenHttpRequestReceived_ButMatcherThrowsException ( )
testApiHandleMessage_ClosesConnectionWithCode500_WhenNotHttpRequestReceived_AndControllerDoesNotExist ( )
testApiHandleMessage_HandlesConnectAndHandlesMessage_WhenHttpRequestReceived ( )
testApiHandleMessage_HandlesError_WhenHttpRequestReceived_ButHandleConnectThrowsException ( )
testApiHandleMessage_PropagatesMessage_WhenNotHttpRequestReceived_AndControllerDoesExist ( )
testApiIsOriginAllowed_ReturnsFalse_WhenIpIsNotBlocked ( )
testApiIsOriginAllowed_ReturnsTrue_WhenIpIsBlocked ( )
testApiRemoveRoute_DoesNothing_WhenRouteDoesNotExist ( )
testApiRemoveRoute_RemovesRoute_WhenRouteDoesExist ( )
testProtectedApiClose_ClosesSocket ( )

비공개 메소드들

메소드 설명
createPassableMessage ( ) : HttpRequest | PHPUnit_Framework_MockObject_MockObject

메소드 상세

createComponent() 공개 메소드

public createComponent ( ) : Kraken\Network\NetworkComponentInterface | PHPUnit_Framework_MockObject_MockObject
리턴 Kraken\Network\NetworkComponentInterface | PHPUnit_Framework_MockObject_MockObject

createMatcher() 공개 메소드

public createMatcher ( string[] | null $methods = [] ) : Symfony\Component\Routing\Matcher\UrlMatcher | PHPUnit_Framework_MockObject_MockObject
$methods string[] | null
리턴 Symfony\Component\Routing\Matcher\UrlMatcher | PHPUnit_Framework_MockObject_MockObject

createRouter() 공개 메소드

public createRouter ( Kraken\Network\NetworkComponentAwareInterface $aware, string[] | null $methods = null, mixed[] $params = [] ) : HttpRouter | PHPUnit_Framework_MockObject_MockObject
$aware Kraken\Network\NetworkComponentAwareInterface
$methods string[] | null
$params mixed[]
리턴 Kraken\Network\Http\Component\Router\HttpRouter | PHPUnit_Framework_MockObject_MockObject

createServer() 공개 메소드

public createServer ( string[] | null $methods = [] ) : Kraken\Network\NetworkComponentAwareInterface | PHPUnit_Framework_MockObject_MockObject
$methods string[] | null
리턴 Kraken\Network\NetworkComponentAwareInterface | PHPUnit_Framework_MockObject_MockObject

testApiAddRoute_AddsRoute_WhenRouteDoesNotExist() 공개 메소드

testApiAddRoute_ReplacesRoute_WhenRouteDoesExist() 공개 메소드

testApiAllowOrigin_BlocksAddress() 공개 메소드

testApiConstructor_CreatesInstance() 공개 메소드

testApiDestructor_DoesNotThrowException() 공개 메소드

testApiDisallowOrigin_UnblocksAddress() 공개 메소드

testApiExistsRoute_ReturnsFalse_WhenRouteDoesNotExist() 공개 메소드

testApiExistsRoute_ReturnsTrue_WhenRouteDoesExist() 공개 메소드

testApiGetAllowedOrigins() 공개 메소드

testApiHandleConnect_DoesNothing() 공개 메소드

testApiHandleDisconnect_DoesNothing_WhenConnectionControllerDoesNotExist() 공개 메소드

testApiHandleDisconnect_PropagatesDisconnection_WhenConnectionControllerDoesExist() 공개 메소드

testApiHandleError_ClosesConnectionWithCode500_WhenConnectionControllerDoesExistButThrowsException() 공개 메소드

testApiHandleError_ClosesConnectionWithCode500_WhenConnectionControllerDoesNotExist() 공개 메소드

testApiHandleError_PropagatesErrorToController_WhenConnectionControllerDoesExist() 공개 메소드

testApiHandleMessage_ClosesConnectionWithCode403_WhenHttpRequestReceived_ButMatcherThrowsMethodNotAllowedException() 공개 메소드

testApiHandleMessage_ClosesConnectionWithCode403_WhenHttpRequestReceived_ButOriginIsNotAllowed() 공개 메소드

testApiHandleMessage_ClosesConnectionWithCode404_WhenHttpRequestReceived_ButMatcherThrowsResourceNotFoundException() 공개 메소드

testApiHandleMessage_ClosesConnectionWithCode500_WhenHttpRequestReceived_ButMatcherThrowsException() 공개 메소드

testApiHandleMessage_ClosesConnectionWithCode500_WhenNotHttpRequestReceived_AndControllerDoesNotExist() 공개 메소드

testApiHandleMessage_HandlesConnectAndHandlesMessage_WhenHttpRequestReceived() 공개 메소드

testApiHandleMessage_HandlesError_WhenHttpRequestReceived_ButHandleConnectThrowsException() 공개 메소드

testApiHandleMessage_PropagatesMessage_WhenNotHttpRequestReceived_AndControllerDoesExist() 공개 메소드

testApiIsOriginAllowed_ReturnsFalse_WhenIpIsNotBlocked() 공개 메소드

testApiIsOriginAllowed_ReturnsTrue_WhenIpIsBlocked() 공개 메소드

testApiRemoveRoute_DoesNothing_WhenRouteDoesNotExist() 공개 메소드

testApiRemoveRoute_RemovesRoute_WhenRouteDoesExist() 공개 메소드

testProtectedApiClose_ClosesSocket() 공개 메소드