PHP Class Kraken\_Unit\Runtime\RuntimeModelTest

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

Public Methods

Method Description
createModel ( string[] $params = [], string[] | null $methods = null ) : RuntimeModel | PHPUnit_Framework_MockObject_MockObject
getStates ( ) : int[]
testApiConstructor_CreatesInstance ( )
testApiCreate_CallsStartAndRejectsPromise_WhenInvokedFromStateOtherThanCreatedOrDestroyedAndStartFailed ( )
testApiCreate_CallsStartAndResolvesPromise_WhenInvokedFromStateOtherThanCreatedOrDestroyedAndStartSucceeded ( )
testApiCreate_RejectsPromise_WhenInvokedFromStateOtherThanCreatedOrDestroyed ( )
testApiCreate_ResolvesPromise_WhenInvokedFromStateCreated ( )
testApiDestroy_CallsStopAndRejectsPromise_WhenInvokedFromStateOtherThanDestroyedAndStopFailed ( )
testApiDestroy_CallsStopAndResolvesPromise_WhenInvokedFromStateOtherThanDestroyedAndStopSucceeded ( )
testApiDestroy_ResolvesPromise_WhenInvokedFromStateDestroyed ( )
testApiDestructor_DoesNotThrowException ( )
testApiFail_CannotBeCalledMoreThanOnceInRow ( )
testApiFail_HandlesErrorThrownByItself ( )
testApiFail_StopsLoopAndDelegatesFailureToSupervisor ( )
testApiGetAlias_ReturnsAlias ( )
testApiGetArgs_ReturnsArgs ( )
testApiGetCore_ReturnsCore_WhenCoreDoesExist ( )
testApiGetCore_ReturnsNull_WhenCoreDoesNotExist ( )
testApiGetEventEmitter_ReturnsEventEmitter_WhenEventEmitterDoesExist ( )
testApiGetEventEmitter_ReturnsNull_WhenEventEmitterDoesNotExist ( )
testApiGetLoop_ReturnsLoop_WhenLoopDoesExist ( )
testApiGetLoop_ReturnsNull_WhenLoopDoesNotExist ( )
testApiGetName_ReturnsName ( )
testApiGetParent_ReturnsParent ( )
testApiGetRuntimeManager_ReturnsManager_WhenManagerDoesExist ( )
testApiGetRuntimeManager_ReturnsNull_WhenManagerDoesNotExist ( )
testApiGetState_ReturnsState ( )
testApiGetSupervisor_ReturnsNull_WhenSupervisorDoesNotExist ( )
testApiGetSupervisor_ReturnsSupervisor_WhenSupervisorDoesExist ( )
testApiGetType_ReturnsType ( )
testApiIsCreated_ReturnsFalse_WhenStateDoesNotMatch ( )
testApiIsCreated_ReturnsTrue_WhenStateDoesMatch ( )
testApiIsDestroyed_ReturnsFalse_WhenStateDoesNotMatch ( )
testApiIsDestroyed_ReturnsTrue_WhenStateDoesMatch ( )
testApiIsFailed_ReturnsFalse_WhenStateDoesNotMatch ( )
testApiIsFailed_ReturnsTrue_WhenStateDoesMatch ( )
testApiIsStarted_ReturnsFalse_WhenStateDoesNotMatch ( )
testApiIsStarted_ReturnsTrue_WhenStateDoesMatch ( )
testApiIsState_ReturnsFalse_WhenStateDoesNotMatch ( )
testApiIsState_ReturnsTrue_WhenStateDoesMatch ( )
testApiIsStopped_ReturnsFalse_WhenStateDoesNotMatch ( )
testApiIsStopped_ReturnsTrue_WhenStateDoesMatch ( )
testApiSetCore_SetsCore ( )
testApiSetEventEmitter_SetsEventEmitter ( )
testApiSetEventEmitter_SetsNull ( )
testApiSetLoop_SetsLoop ( )
testApiSetLoop_SetsNull ( )
testApiSetRuntimeManager_SetsManager ( )
testApiSetState_SetsState ( )
testApiSetSupervisor_SetsNull ( )
testApiSetSupervisor_SetsSupervisor ( )
testApiStart_RejectsPromise_WhenInvokedFromStateDestroyed ( )
testApiStart_ResolvesPromise_WhenInvokedFromStateCreatedOrStopped ( )
testApiStart_ResolvesPromise_WhenInvokedFromStateStarted ( )
testApiStop_RejectsPromise_WhenInvokedFromStateCreatedOrDestroyed ( )
testApiStop_ResolvesPromiseAndEmitsEvents_WhenInvokedFromStateStarted ( )
testApiStop_ResolvesPromise_WhenInvokedFromStateStopped ( )
testApiSucceed_ResumesLoop ( )
testProtectedApiGetLoopState_ReturnsLoopState ( )
testProtectedApiIsLoopState_ReturnsFalse_WhenLoopStateDoesNotMatch ( )
testProtectedApiIsLoopState_ReturnsTrue_WhenLoopStateDoesMatch ( )
testProtectedApiSetLoopState_ExportsDataFromBackupLoop_WhenSwitchedStateFromStartedToFailed ( )
testProtectedApiSetLoopState_ImportsDataFromBackupLoop_WhenSwitchedStateFromFailedToStarted ( )
testProtectedApiSetLoopState_ReturnsImmediately_WhenNewStateDoesMatchCurrent ( )
testProtectedApiSetLoopState_StopsLoopAndChangesState_WhenNewStateDoesNotMatchCurrent ( )
testProtectedApiSetLoopState_ThrowsException_WhenNewStateIsInvalid ( )
testProtectedApiStartLoop_CallsFailMethod_WhenLoopThrowsException ( )
testProtectedApiStartLoop_DoesNothing_WhenNextStateIsStopped ( )
testProtectedApiStartLoop_RestartsLoop_WhenNeeded ( )
testProtectedApiStartLoop_StartsLoop_WhenNeeded ( )
testProtectedApiStopLoop_StopsLoop ( )

Method Details

createModel() public method

public createModel ( string[] $params = [], string[] | null $methods = null ) : RuntimeModel | PHPUnit_Framework_MockObject_MockObject
$params string[]
$methods string[] | null
return Kraken\Runtime\RuntimeModel | PHPUnit_Framework_MockObject_MockObject

getStates() public method

public getStates ( ) : int[]
return int[]

testApiConstructor_CreatesInstance() public method

testApiCreate_CallsStartAndRejectsPromise_WhenInvokedFromStateOtherThanCreatedOrDestroyedAndStartFailed() public method

testApiCreate_CallsStartAndResolvesPromise_WhenInvokedFromStateOtherThanCreatedOrDestroyedAndStartSucceeded() public method

testApiCreate_RejectsPromise_WhenInvokedFromStateOtherThanCreatedOrDestroyed() public method

testApiCreate_ResolvesPromise_WhenInvokedFromStateCreated() public method

testApiDestroy_CallsStopAndRejectsPromise_WhenInvokedFromStateOtherThanDestroyedAndStopFailed() public method

testApiDestroy_CallsStopAndResolvesPromise_WhenInvokedFromStateOtherThanDestroyedAndStopSucceeded() public method

testApiDestroy_ResolvesPromise_WhenInvokedFromStateDestroyed() public method

testApiDestructor_DoesNotThrowException() public method

testApiFail_CannotBeCalledMoreThanOnceInRow() public method

testApiFail_HandlesErrorThrownByItself() public method

testApiFail_StopsLoopAndDelegatesFailureToSupervisor() public method

testApiGetAlias_ReturnsAlias() public method

testApiGetArgs_ReturnsArgs() public method

testApiGetCore_ReturnsCore_WhenCoreDoesExist() public method

testApiGetCore_ReturnsNull_WhenCoreDoesNotExist() public method

testApiGetEventEmitter_ReturnsEventEmitter_WhenEventEmitterDoesExist() public method

testApiGetEventEmitter_ReturnsNull_WhenEventEmitterDoesNotExist() public method

testApiGetLoop_ReturnsLoop_WhenLoopDoesExist() public method

testApiGetLoop_ReturnsNull_WhenLoopDoesNotExist() public method

testApiGetName_ReturnsName() public method

testApiGetParent_ReturnsParent() public method

testApiGetRuntimeManager_ReturnsManager_WhenManagerDoesExist() public method

testApiGetRuntimeManager_ReturnsNull_WhenManagerDoesNotExist() public method

testApiGetState_ReturnsState() public method

testApiGetSupervisor_ReturnsNull_WhenSupervisorDoesNotExist() public method

testApiGetSupervisor_ReturnsSupervisor_WhenSupervisorDoesExist() public method

testApiGetType_ReturnsType() public method

testApiIsCreated_ReturnsFalse_WhenStateDoesNotMatch() public method

testApiIsCreated_ReturnsTrue_WhenStateDoesMatch() public method

testApiIsDestroyed_ReturnsFalse_WhenStateDoesNotMatch() public method

testApiIsDestroyed_ReturnsTrue_WhenStateDoesMatch() public method

testApiIsFailed_ReturnsFalse_WhenStateDoesNotMatch() public method

testApiIsFailed_ReturnsTrue_WhenStateDoesMatch() public method

testApiIsStarted_ReturnsFalse_WhenStateDoesNotMatch() public method

testApiIsStarted_ReturnsTrue_WhenStateDoesMatch() public method

testApiIsState_ReturnsFalse_WhenStateDoesNotMatch() public method

testApiIsState_ReturnsTrue_WhenStateDoesMatch() public method

testApiIsStopped_ReturnsFalse_WhenStateDoesNotMatch() public method

testApiIsStopped_ReturnsTrue_WhenStateDoesMatch() public method

testApiSetCore_SetsCore() public method

testApiSetEventEmitter_SetsEventEmitter() public method

testApiSetEventEmitter_SetsNull() public method

testApiSetLoop_SetsLoop() public method

testApiSetLoop_SetsNull() public method

testApiSetRuntimeManager_SetsManager() public method

testApiSetState_SetsState() public method

testApiSetSupervisor_SetsNull() public method

testApiSetSupervisor_SetsSupervisor() public method

testApiStart_RejectsPromise_WhenInvokedFromStateDestroyed() public method

testApiStart_ResolvesPromise_WhenInvokedFromStateCreatedOrStopped() public method

testApiStart_ResolvesPromise_WhenInvokedFromStateStarted() public method

testApiStop_RejectsPromise_WhenInvokedFromStateCreatedOrDestroyed() public method

testApiStop_ResolvesPromiseAndEmitsEvents_WhenInvokedFromStateStarted() public method

testApiStop_ResolvesPromise_WhenInvokedFromStateStopped() public method

testApiSucceed_ResumesLoop() public method

testProtectedApiGetLoopState_ReturnsLoopState() public method

testProtectedApiIsLoopState_ReturnsFalse_WhenLoopStateDoesNotMatch() public method

testProtectedApiIsLoopState_ReturnsTrue_WhenLoopStateDoesMatch() public method

testProtectedApiSetLoopState_ExportsDataFromBackupLoop_WhenSwitchedStateFromStartedToFailed() public method

testProtectedApiSetLoopState_ImportsDataFromBackupLoop_WhenSwitchedStateFromFailedToStarted() public method

testProtectedApiSetLoopState_ReturnsImmediately_WhenNewStateDoesMatchCurrent() public method

testProtectedApiSetLoopState_StopsLoopAndChangesState_WhenNewStateDoesNotMatchCurrent() public method

testProtectedApiSetLoopState_ThrowsException_WhenNewStateIsInvalid() public method

testProtectedApiStartLoop_CallsFailMethod_WhenLoopThrowsException() public method

testProtectedApiStartLoop_DoesNothing_WhenNextStateIsStopped() public method

testProtectedApiStartLoop_RestartsLoop_WhenNeeded() public method

testProtectedApiStartLoop_StartsLoop_WhenNeeded() public method

testProtectedApiStopLoop_StopsLoop() public method