PHP Class Kraken\_Unit\Channel\ChannelCompositeTest

Inheritance: extends Kraken\Test\TUnit
Show file Open project: kraken-php/framework

Public Methods

Method Description
createBus ( string $name = 'name', string[] $methods = [] ) : Channel | PHPUnit_Framework_MockObject_MockObject
createChannel ( Kraken\Channel\ChannelInterface[] | Kraken\Channel\ChannelCompositeInterface[] $buses = [], string[] | null $methods = null ) : ChannelComposite | PHPUnit_Framework_MockObject_MockObject
createLoop ( string[] | null $methods = null ) : Loop | PHPUnit_Framework_MockObject_MockObject
createRouter ( string[] | null $methods = null ) : RouterComposite | PHPUnit_Framework_MockObject_MockObject
eventsProvider ( ) : string[][]
prepareBus ( string $name = 'name', string[] | null $methods = [] ) : Channel | PHPUnit_Framework_MockObject_MockObject
testApiConstructor_CreatesInstance ( )
testApiCreateProtocol_CreatesProtocol_WhenNullPassed ( )
testApiCreateProtocol_CreatesProtocol_WhenStringPassed ( )
testApiDestructor_DoesNotThrowException ( )
testApiExistsBus_ReturnsFalse_WhenBusDoesNotExist ( )
testApiExistsBus_ReturnsTrue_WhenBusDoesExist ( )
testApiFilterConnected_ReturnsEmptyArray_WhenNoBusSet ( )
testApiGetBus_ReturnsBus_WhenBusDoesExist ( )
testApiGetBus_ThrowsException_WhenBusDoesNotExist ( )
testApiGetBuses_ReturnsArrayOfBuses_WhenAtLeastOneBusIsSet ( )
testApiGetBuses_ReturnsEmptyArray_WhenNoBusIsSet ( )
testApiGetConnected_ReturnsEmptyArray_WhenNoBusSet ( )
testApiGetConnected_ReturnsUniqueArrayOfConnectedNames ( )
testApiHandlePushAsync_ReturnsFalseAndDoesNotEmitEvents_WhenAllBusesReturnFalse ( )
testApiHandlePushAsync_ReturnsTrueAndDoesEmitsEvents_WhenAtLeastOneBusReturnTrue ( )
testApiHandlePushRequest_ReturnsFalseAndDoesNotEmitEvents_WhenAllBusesReturnFalse ( )
testApiHandlePushRequest_ReturnsTrueAndDoesEmitsEvents_WhenAtLeastOneBusReturnTrue ( )
testApiHandleSendAsync_HandlesMessageUsingOutput ( )
testApiHandleSendRequest_HandlesMessagUsingOutput ( )
testApiInput_ReturnsRouterInputBus ( )
testApiIsConnected_ReturnsFalse_WhenNoneBusIsSet ( )
testApiIsConnected_ReturnsFalse_WhenNoneBusReturnsTrue ( )
testApiIsConnected_ReturnsTrue_WhenAtLeastOneBusReturnsTrue ( )
testApiIsStarted_ReturnsEmptyArray_WhenNoneBusIsSet ( )
testApiIsStarted_ReturnsStatusesArray ( )
testApiIsStopped_ReturnsEmptyArray_WhenNoneBusIsSet ( )
testApiIsStopped_ReturnsStatusesArray ( )
testApiMatchConnected_ReturnsUniqueArrayOfConnectedNames ( )
testApiModel_ReturnsNull ( )
testApiName_ReturnsName ( )
testApiOutput_ReturnsRouterOutputBus ( )
testApiPull_PullsMessage ( )
testApiPushAsync_HandlesSendAsync ( )
testApiPushAsync_HandlesSendAsyncOnEachName ( )
testApiPushAsync_ReturnsArrayOfStatuses_WhenMultipleNamesSet ( )
testApiPushAsync_ReturnsEmptyArray_WhenNoneNameSet ( )
testApiPushAsync_ReturnsStatus_WhenSingleNameSet ( )
testApiPushRequest_HandlesSendAsync ( )
testApiPushRequest_HandlesSendAsyncOnEachName ( )
testApiPushRequest_ReturnsArrayOfStatuses_WhenMultipleNamesSet ( )
testApiPushRequest_ReturnsEmptyArray_WhenNoneNameSet ( )
testApiPushRequest_ReturnsStatus_WhenSingleNameSet ( )
testApiPush_PushesAsync_WhenCallbacksAreNull ( )
testApiPush_PushesRequest_WhenAtLeastOneOfCallbacksIsNotNull ( )
testApiReceive_ReceivesMessage ( )
testApiRemoveBus_DoesNothing_WhenBusDoesNotExist ( )
testApiRemoveBus_RemovesBus_WhenBusDoesExist ( )
testApiRouter_ReturnsRouter ( )
testApiSendAsync_HandlesSendAsync ( )
testApiSendAsync_HandlesSendAsyncOnEachName ( )
testApiSendAsync_ReturnsArrayOfStatuses_WhenMultipleNamesSet ( )
testApiSendAsync_ReturnsEmptyArray_WhenNoneNameSet ( )
testApiSendAsync_ReturnsStatus_WhenSingleNameSet ( )
testApiSendRequest_HandlesSendAsync ( )
testApiSendRequest_HandlesSendAsyncOnEachName ( )
testApiSendRequest_ReturnsArrayOfStatuses_WhenMultipleNamesSet ( )
testApiSendRequest_ReturnsEmptyArray_WhenNoneNameSet ( )
testApiSendRequest_ReturnsStatus_WhenSingleNameSet ( )
testApiSend_SendsAsync_WhenCallbacksAreNull ( )
testApiSend_SendsRequest_WhenAtLeastOneOfCallbacksIsNotNull ( )
testApiSetBus_SetsBus_WhenBusDoesNotExist ( )
testApiSetBus_ThrowsException_WhenBusDoesExist ( )
testApiStart_CallsStartOnAllBuses ( )
testApiStop_CallsStopOnAllBuses ( )
testCaseAllOnMethods_RegisterHandlers ( $event )
testProtectedApiCreateMessageProtocol_AcceptsMessageProtocol ( )
testProtectedApiCreateMessageProtocol_AcceptsNull ( )
testProtectedApiCreateMessageProtocol_AcceptsStringProtocol ( )
testProtectedApiCreateMessageProtocol_DoesNotOverwriteSetFields ( )
testProtectedApiCreateMessageProtocol_OverwritesNotSetFields ( )
testProtectedApiGenID_GeneratesUniqueID_WithPrefixEqualToSeed ( )
testProtectedApiGetNextSuffix_ResetsOnAfter2Mld ( )
testProtectedApiGetNextSuffix_ReturnsNextSuffix ( )
testProtectedApiGetTime_ReturnsTime ( )

Method Details

createBus() public method

public createBus ( string $name = 'name', string[] $methods = [] ) : Channel | PHPUnit_Framework_MockObject_MockObject
$name string
$methods string[]
return Kraken\Channel\Channel | PHPUnit_Framework_MockObject_MockObject

createChannel() public method

public createChannel ( Kraken\Channel\ChannelInterface[] | Kraken\Channel\ChannelCompositeInterface[] $buses = [], string[] | null $methods = null ) : ChannelComposite | PHPUnit_Framework_MockObject_MockObject
$buses Kraken\Channel\ChannelInterface[] | Kraken\Channel\ChannelCompositeInterface[]
$methods string[] | null
return Kraken\Channel\ChannelComposite | PHPUnit_Framework_MockObject_MockObject

createLoop() public method

public createLoop ( string[] | null $methods = null ) : Loop | PHPUnit_Framework_MockObject_MockObject
$methods string[] | null
return Kraken\Loop\Loop | PHPUnit_Framework_MockObject_MockObject

createRouter() public method

public createRouter ( string[] | null $methods = null ) : RouterComposite | PHPUnit_Framework_MockObject_MockObject
$methods string[] | null
return Kraken\Channel\Router\RouterComposite | PHPUnit_Framework_MockObject_MockObject

eventsProvider() public method

public eventsProvider ( ) : string[][]
return string[][]

prepareBus() public method

public prepareBus ( string $name = 'name', string[] | null $methods = [] ) : Channel | PHPUnit_Framework_MockObject_MockObject
$name string
$methods string[] | null
return Kraken\Channel\Channel | PHPUnit_Framework_MockObject_MockObject

testApiConstructor_CreatesInstance() public method

testApiCreateProtocol_CreatesProtocol_WhenNullPassed() public method

testApiCreateProtocol_CreatesProtocol_WhenStringPassed() public method

testApiDestructor_DoesNotThrowException() public method

testApiExistsBus_ReturnsFalse_WhenBusDoesNotExist() public method

testApiExistsBus_ReturnsTrue_WhenBusDoesExist() public method

testApiFilterConnected_ReturnsEmptyArray_WhenNoBusSet() public method

testApiGetBus_ReturnsBus_WhenBusDoesExist() public method

testApiGetBus_ThrowsException_WhenBusDoesNotExist() public method

testApiGetBuses_ReturnsArrayOfBuses_WhenAtLeastOneBusIsSet() public method

testApiGetBuses_ReturnsEmptyArray_WhenNoBusIsSet() public method

testApiGetConnected_ReturnsEmptyArray_WhenNoBusSet() public method

testApiGetConnected_ReturnsUniqueArrayOfConnectedNames() public method

testApiHandlePushAsync_ReturnsFalseAndDoesNotEmitEvents_WhenAllBusesReturnFalse() public method

testApiHandlePushAsync_ReturnsTrueAndDoesEmitsEvents_WhenAtLeastOneBusReturnTrue() public method

testApiHandlePushRequest_ReturnsFalseAndDoesNotEmitEvents_WhenAllBusesReturnFalse() public method

testApiHandlePushRequest_ReturnsTrueAndDoesEmitsEvents_WhenAtLeastOneBusReturnTrue() public method

testApiHandleSendAsync_HandlesMessageUsingOutput() public method

testApiHandleSendRequest_HandlesMessagUsingOutput() public method

testApiInput_ReturnsRouterInputBus() public method

testApiIsConnected_ReturnsFalse_WhenNoneBusIsSet() public method

testApiIsConnected_ReturnsFalse_WhenNoneBusReturnsTrue() public method

testApiIsConnected_ReturnsTrue_WhenAtLeastOneBusReturnsTrue() public method

testApiIsStarted_ReturnsEmptyArray_WhenNoneBusIsSet() public method

testApiIsStarted_ReturnsStatusesArray() public method

testApiIsStopped_ReturnsEmptyArray_WhenNoneBusIsSet() public method

testApiIsStopped_ReturnsStatusesArray() public method

testApiMatchConnected_ReturnsUniqueArrayOfConnectedNames() public method

testApiModel_ReturnsNull() public method

testApiName_ReturnsName() public method

testApiOutput_ReturnsRouterOutputBus() public method

testApiPull_PullsMessage() public method

testApiPushAsync_HandlesSendAsync() public method

testApiPushAsync_HandlesSendAsyncOnEachName() public method

testApiPushAsync_ReturnsArrayOfStatuses_WhenMultipleNamesSet() public method

testApiPushAsync_ReturnsEmptyArray_WhenNoneNameSet() public method

testApiPushAsync_ReturnsStatus_WhenSingleNameSet() public method

testApiPushRequest_HandlesSendAsync() public method

testApiPushRequest_HandlesSendAsyncOnEachName() public method

testApiPushRequest_ReturnsArrayOfStatuses_WhenMultipleNamesSet() public method

testApiPushRequest_ReturnsEmptyArray_WhenNoneNameSet() public method

testApiPushRequest_ReturnsStatus_WhenSingleNameSet() public method

testApiPush_PushesAsync_WhenCallbacksAreNull() public method

testApiPush_PushesRequest_WhenAtLeastOneOfCallbacksIsNotNull() public method

testApiReceive_ReceivesMessage() public method

testApiRemoveBus_DoesNothing_WhenBusDoesNotExist() public method

testApiRemoveBus_RemovesBus_WhenBusDoesExist() public method

testApiRouter_ReturnsRouter() public method

testApiSendAsync_HandlesSendAsync() public method

testApiSendAsync_HandlesSendAsyncOnEachName() public method

testApiSendAsync_ReturnsArrayOfStatuses_WhenMultipleNamesSet() public method

testApiSendAsync_ReturnsEmptyArray_WhenNoneNameSet() public method

testApiSendAsync_ReturnsStatus_WhenSingleNameSet() public method

testApiSendRequest_HandlesSendAsync() public method

testApiSendRequest_HandlesSendAsyncOnEachName() public method

testApiSendRequest_ReturnsArrayOfStatuses_WhenMultipleNamesSet() public method

testApiSendRequest_ReturnsEmptyArray_WhenNoneNameSet() public method

testApiSendRequest_ReturnsStatus_WhenSingleNameSet() public method

testApiSend_SendsAsync_WhenCallbacksAreNull() public method

testApiSend_SendsRequest_WhenAtLeastOneOfCallbacksIsNotNull() public method

testApiSetBus_SetsBus_WhenBusDoesNotExist() public method

testApiSetBus_ThrowsException_WhenBusDoesExist() public method

testApiStart_CallsStartOnAllBuses() public method

testApiStop_CallsStopOnAllBuses() public method

testCaseAllOnMethods_RegisterHandlers() public method

testProtectedApiCreateMessageProtocol_AcceptsMessageProtocol() public method

testProtectedApiCreateMessageProtocol_AcceptsNull() public method

testProtectedApiCreateMessageProtocol_AcceptsStringProtocol() public method

testProtectedApiCreateMessageProtocol_DoesNotOverwriteSetFields() public method

testProtectedApiCreateMessageProtocol_OverwritesNotSetFields() public method

testProtectedApiGenID_GeneratesUniqueID_WithPrefixEqualToSeed() public method

testProtectedApiGetNextSuffix_ResetsOnAfter2Mld() public method

testProtectedApiGetNextSuffix_ReturnsNextSuffix() public method

testProtectedApiGetTime_ReturnsTime() public method