PHP Class Kraken\_Unit\Channel\Extra\RequestTest

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

Public Methods

Method Description
createRequest ( string $name, string | Kraken\Channel\Protocol\ProtocolInterface $message, mixed[] $params = [], string[] $methods = [] ) : Request | PHPUnit_Framework_MockObject_MockObject
testApiCall_CallsSendMethodWithPromise ( )
testApiConstrutor_AllowsProtocolMessage ( )
testApiConstrutor_DoesNotThrowException ( )
testApiConstrutor_SetsDefaultParams ( )
testApiConstrutor_SetsPassedParams ( )
testApiConstrutor_TurnsStringMessageToProtocol ( )
testApiDestructor_DoesNotThrowException ( )
testApiInvoke_CallsSendMethodWithPromise ( )
testApiRetryOrReset_RejectsPromiseInRetry_WhenRetriesLimitIsReached ( )
testApiRetryOrReset_ResetsInRetryUsingTimer_WhenIntervalIsGreaterThanZero ( )
testApiRetryOrReset_ResetsInRetry_WhenIntervalIsEqualToZero ( )
testApiRetryOrReset_ResetsWhenExceptionIsTaskIncomplete ( )
testApiSend_CallsSendMethodOnChannel ( )
testApiSend_RejectsPromiseOnFailure ( )
testApiSend_ResolvesPromiseOnSuccess ( )
testApiSend_ReturnsImmediatelyWhenNonPendingPromisePassed ( )
testApiSend_TriesToRetryOnCancel ( )

Private Methods

Method Description
createChannelMock ( string $name ) : Channel | PHPUnit_Framework_MockObject_MockObject

Method Details

createRequest() public method

public createRequest ( string $name, string | Kraken\Channel\Protocol\ProtocolInterface $message, mixed[] $params = [], string[] $methods = [] ) : Request | PHPUnit_Framework_MockObject_MockObject
$name string
$message string | Kraken\Channel\Protocol\ProtocolInterface
$params mixed[]
$methods string[]
return Kraken\Channel\Extra\Request | PHPUnit_Framework_MockObject_MockObject

testApiCall_CallsSendMethodWithPromise() public method

testApiConstrutor_AllowsProtocolMessage() public method

testApiConstrutor_DoesNotThrowException() public method

testApiConstrutor_SetsDefaultParams() public method

testApiConstrutor_SetsPassedParams() public method

testApiConstrutor_TurnsStringMessageToProtocol() public method

testApiDestructor_DoesNotThrowException() public method

testApiInvoke_CallsSendMethodWithPromise() public method

testApiRetryOrReset_RejectsPromiseInRetry_WhenRetriesLimitIsReached() public method

testApiRetryOrReset_ResetsInRetryUsingTimer_WhenIntervalIsGreaterThanZero() public method

testApiRetryOrReset_ResetsInRetry_WhenIntervalIsEqualToZero() public method

testApiRetryOrReset_ResetsWhenExceptionIsTaskIncomplete() public method

testApiSend_CallsSendMethodOnChannel() public method

testApiSend_RejectsPromiseOnFailure() public method

testApiSend_ResolvesPromiseOnSuccess() public method

testApiSend_ReturnsImmediatelyWhenNonPendingPromisePassed() public method

testApiSend_TriesToRetryOnCancel() public method