PHP Class Kraken\_Unit\Runtime\Container\Manager\ThreadManagerBaseTest

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

Public Methods

Method Description
createThreadManager ( string[] $methods = [] ) : ThreadManagerBase | PHPUnit_Framework_MockObject_MockObject
getCommand ( ) : RuntimeCommand
testApiConstructor_CreatesInstance ( )
testApiCreateThread_RecreatesThreadWithForceHard_WhenThreadDoesExistAndForceIsForceHard ( )
testApiCreateThread_RecreatesThreadWithForceSoft_WhenThreadDoesExistAndForceIsForceSoft ( )
testApiCreateThread_RecreatesThreadWithForce_WhenThreadDoesExistAndForceIsForce ( )
testApiCreateThread_RejectsPromise_WhenThreadDoesExistAndForceIsDefault ( )
testApiCreateThread_RejectsPromise_WhenThreadDoesNotExistAndNameIsNull ( )
testApiCreateThreads_RejectsPromise_WhenAtLeastOneThreadCouldNotBeCreated ( )
testApiCreateThreads_ResolvesPromise_WhenAllThreadsAreCreated ( )
testApiDestroyThread_RejectsPromise_WhenThreadDoesExistAndForceFlagIsDestroyKeep ( )
testApiDestroyThread_ResolvesPromise_WhenThreadDoesNotExist ( )
testApiDestroyThreads_RejectsPromise_WhenAtLeastOneThreadCouldNotBeDestroyed ( )
testApiDestroyThreads_ResolvesPromise_WhenAllThreadsAreDestroyed ( )
testApiDestructor_DoesNotThrowException ( )
testApiExistsThread_ReturnsFalse_WhenThreadDoesNotExist ( )
testApiExistsThread_ReturnsTrue_WhenThreadDoesExist ( )
testApiFlushThreads_FlushesThreads_WhenFlagIsOtherThanDestroyKeep ( )
testApiFlushThreads_RejectsPromise_WhenFlagIsDestroyKeep ( )
testApiGetThreads_ReturnsFulfilledPromiseThatContainsListOfThreads ( )
testApiStartThread_InvokesValidCommand ( )
testApiStartThreads_RejectsPromise_WhenAtLeastOneThreadCouldNotBeStarted ( )
testApiStartThreads_ResolvesPromise_WhenAllThreadsAreStarted ( )
testApiStopThread_InvokesValidCommand ( )
testApiStopThreads_RejectsPromise_WhenAtLeastOneThreadCouldNotBeStopped ( )
testApiStopThreads_ResolvesPromise_WhenAllThreadsAreStopped ( )
testProtectedApiAllocateThread_AllocatesThreadAndReturnsTrue ( )
testProtectedApiCreateRequest_CreatesRequest ( )
testProtectedApiFreeThread_FreesThreadAndReturnsTrue ( )

Method Details

createThreadManager() public method

public createThreadManager ( string[] $methods = [] ) : ThreadManagerBase | PHPUnit_Framework_MockObject_MockObject
$methods string[]
return Kraken\Runtime\Container\Manager\ThreadManagerBase | PHPUnit_Framework_MockObject_MockObject

getCommand() public method

public getCommand ( ) : RuntimeCommand
return Kraken\Runtime\RuntimeCommand

testApiConstructor_CreatesInstance() public method

testApiCreateThread_RecreatesThreadWithForceHard_WhenThreadDoesExistAndForceIsForceHard() public method

testApiCreateThread_RecreatesThreadWithForceSoft_WhenThreadDoesExistAndForceIsForceSoft() public method

testApiCreateThread_RecreatesThreadWithForce_WhenThreadDoesExistAndForceIsForce() public method

testApiCreateThread_RejectsPromise_WhenThreadDoesExistAndForceIsDefault() public method

testApiCreateThread_RejectsPromise_WhenThreadDoesNotExistAndNameIsNull() public method

testApiCreateThreads_RejectsPromise_WhenAtLeastOneThreadCouldNotBeCreated() public method

testApiCreateThreads_ResolvesPromise_WhenAllThreadsAreCreated() public method

testApiDestroyThread_RejectsPromise_WhenThreadDoesExistAndForceFlagIsDestroyKeep() public method

testApiDestroyThread_ResolvesPromise_WhenThreadDoesNotExist() public method

testApiDestroyThreads_RejectsPromise_WhenAtLeastOneThreadCouldNotBeDestroyed() public method

testApiDestroyThreads_ResolvesPromise_WhenAllThreadsAreDestroyed() public method

testApiDestructor_DoesNotThrowException() public method

testApiExistsThread_ReturnsFalse_WhenThreadDoesNotExist() public method

testApiExistsThread_ReturnsTrue_WhenThreadDoesExist() public method

testApiFlushThreads_FlushesThreads_WhenFlagIsOtherThanDestroyKeep() public method

testApiFlushThreads_RejectsPromise_WhenFlagIsDestroyKeep() public method

testApiGetThreads_ReturnsFulfilledPromiseThatContainsListOfThreads() public method

testApiStartThread_InvokesValidCommand() public method

testApiStartThreads_RejectsPromise_WhenAtLeastOneThreadCouldNotBeStarted() public method

testApiStartThreads_ResolvesPromise_WhenAllThreadsAreStarted() public method

testApiStopThread_InvokesValidCommand() public method

testApiStopThreads_RejectsPromise_WhenAtLeastOneThreadCouldNotBeStopped() public method

testApiStopThreads_ResolvesPromise_WhenAllThreadsAreStopped() public method

testProtectedApiAllocateThread_AllocatesThreadAndReturnsTrue() public method

testProtectedApiCreateRequest_CreatesRequest() public method

testProtectedApiFreeThread_FreesThreadAndReturnsTrue() public method