ProcessTest
extends TestCase
in package
Tags
Table of Contents
Properties
- $notEnhancedSigchild : mixed
- $phpBin : mixed
- $process : mixed
- $sigchild : mixed
Methods
- chainedCommandsOutputProvider() : mixed
- pipesCodeProvider() : mixed
- provideEscapeArgument() : mixed
- provideIncrementalOutput() : mixed
- provideInputValues() : mixed
- provideInvalidInputValues() : mixed
- provideMethodsThatNeedARunningProcess() : mixed
- provideMethodsThatNeedATerminatedProcess() : mixed
- provideOutputFetchingMethods() : mixed
- provideVariousIncrementals() : mixed
- provideWrongSignal() : mixed
- responsesCodeProvider() : mixed
- setUpBeforeClass() : mixed
- testAllOutputIsActuallyReadOnTermination() : mixed
- testCallbackIsExecutedForOutput() : mixed
- testCallbackIsExecutedForOutputWheneverOutputIsDisabled() : mixed
- testCallbacksAreExecutedWithStart() : mixed
- testChainedCommandsOutput() : mixed
- testChainedProcesses() : mixed
- testCheckTimeoutOnNonStartedProcess() : mixed
- testCheckTimeoutOnStartedProcess() : mixed
- testCheckTimeoutOnTerminatedProcess() : mixed
- testDisableOutputDisablesTheOutput() : mixed
- testDisableOutputWhileIdleTimeoutIsSet() : mixed
- testDisableOutputWhileRunningThrowsException() : mixed
- testEnableOrDisableOutputAfterRunDoesNotThrowException() : mixed
- testEnableOutputWhileRunningThrowsException() : mixed
- testEnvArgument() : mixed
- testEnvBackupDoesNotDeleteExistingVars() : mixed
- testEnvIsInherited() : mixed
- testEscapeArgument() : mixed
- testEscapeArgumentWhenInheritEnvDisabled() : mixed
- testExitCodeCommandFailed() : mixed
- testExitCodeIsAvailableAfterSignal() : mixed
- testExitCodeText() : mixed
- testExitCodeTextIsNullWhenExitCodeIsNull() : mixed
- testFloatAndNullTimeout() : mixed
- testFlushErrorOutput() : mixed
- testFlushOutput() : mixed
- testGetCommandLine() : mixed
- testGetErrorOutput() : mixed
- testGetExitCode() : mixed
- testGetExitCodeIsNullOnStart() : mixed
- testGetExitCodeIsNullOnWhenStartingAgain() : mixed
- testGetOutput() : mixed
- testGetOutputWhileDisabled() : mixed
- testGetPid() : mixed
- testGetPidIsNullAfterRun() : mixed
- testGetPidIsNullBeforeStart() : mixed
- testIdleTimeout() : mixed
- testIdleTimeoutNotExceededWhenOutputIsSent() : mixed
- testIncrementalOutput() : mixed
- testIncrementalOutputDoesNotRequireAnotherCall() : mixed
- testInheritEnvDisabled() : mixed
- testInputStreamOnEmpty() : mixed
- testInputStreamWithCallable() : mixed
- testInputStreamWithGenerator() : mixed
- testInvalidInput() : mixed
- testIsNotSuccessful() : mixed
- testIsSuccessful() : mixed
- testIsSuccessfulOnlyAfterTerminated() : mixed
- testIterateOverProcessWithTimeout() : mixed
- testIteratorInput() : mixed
- testIteratorOutput() : mixed
- testKillSignalTerminatesProcessCleanly() : mixed
- testLiveStreamAsInput() : mixed
- testMethodsThatNeedARunningProcess() : mixed
- testMethodsThatNeedATerminatedProcess() : mixed
- testMustRun() : mixed
- testMustRunThrowsException() : mixed
- testNegativeTimeoutFromConstructor() : mixed
- testNegativeTimeoutFromSetter() : mixed
- testNonBlockingNorClearingIteratorOutput() : mixed
- testProcessIsNotSignaled() : mixed
- testProcessIsSignaledIfStopped() : mixed
- testProcessPipes() : mixed
- tests results from sub processes.
- testProcessResponses() : mixed
- tests results from sub processes.
- testProcessThrowsExceptionWhenExternallySignaled() : mixed
- testProcessWithoutTermSignal() : mixed
- testPTYCommand() : mixed
- testRawCommandLine() : mixed
- testRestart() : mixed
- testRunProcessWithTimeout() : mixed
- testSetBadEnv() : mixed
- testSetIdleTimeoutWhileOutputIsDisabled() : mixed
- testSetInputWhileRunningThrowsAnException() : mixed
- testSetNullIdleTimeoutWhileOutputIsDisabled() : mixed
- testSetStreamAsInput() : mixed
- testSignal() : mixed
- testSignalProcessNotRunning() : mixed
- testSimpleInputStream() : mixed
- testStartAfterATimeout() : mixed
- testStartIsNonBlocking() : mixed
- testStatus() : mixed
- testStop() : mixed
- testStopTerminatesProcessCleanly() : mixed
- testStopWithTimeoutIsActuallyWorking() : mixed
- testSuccessfulMustRunHasCorrectExitCode() : mixed
- testTermSignalTerminatesProcessCleanly() : mixed
- testThatProcessDoesNotThrowWarningDuringRun() : mixed
- testTTYCommand() : mixed
- testTTYCommandExitCode() : mixed
- testTTYInWindowsEnvironment() : mixed
- testUpdateStatus() : mixed
- testValidInput() : mixed
- testWrongSignal() : mixed
- testZeroAsOutput() : mixed
- tearDown() : mixed
- getProcess() : Process
- getProcessForCode() : Process
- skipIfNotEnhancedSigchild() : mixed
Properties
$notEnhancedSigchild
private
static mixed
$notEnhancedSigchild
= false
$phpBin
private
static mixed
$phpBin
$process
private
static mixed
$process
$sigchild
private
static mixed
$sigchild
Methods
chainedCommandsOutputProvider()
public
chainedCommandsOutputProvider() : mixed
pipesCodeProvider()
public
pipesCodeProvider() : mixed
provideEscapeArgument()
public
provideEscapeArgument() : mixed
provideIncrementalOutput()
public
provideIncrementalOutput() : mixed
provideInputValues()
public
provideInputValues() : mixed
provideInvalidInputValues()
public
provideInvalidInputValues() : mixed
provideMethodsThatNeedARunningProcess()
public
provideMethodsThatNeedARunningProcess() : mixed
provideMethodsThatNeedATerminatedProcess()
public
provideMethodsThatNeedATerminatedProcess() : mixed
provideOutputFetchingMethods()
public
provideOutputFetchingMethods() : mixed
provideVariousIncrementals()
public
provideVariousIncrementals() : mixed
provideWrongSignal()
public
provideWrongSignal() : mixed
responsesCodeProvider()
public
responsesCodeProvider() : mixed
setUpBeforeClass()
public
static setUpBeforeClass() : mixed
testAllOutputIsActuallyReadOnTermination()
public
testAllOutputIsActuallyReadOnTermination() : mixed
testCallbackIsExecutedForOutput()
public
testCallbackIsExecutedForOutput() : mixed
testCallbackIsExecutedForOutputWheneverOutputIsDisabled()
public
testCallbackIsExecutedForOutputWheneverOutputIsDisabled() : mixed
testCallbacksAreExecutedWithStart()
public
testCallbacksAreExecutedWithStart() : mixed
testChainedCommandsOutput()
public
testChainedCommandsOutput(mixed $expected, mixed $operator, mixed $input) : mixed
Parameters
- $expected : mixed
- $operator : mixed
- $input : mixed
Tags
testChainedProcesses()
public
testChainedProcesses() : mixed
testCheckTimeoutOnNonStartedProcess()
public
testCheckTimeoutOnNonStartedProcess() : mixed
testCheckTimeoutOnStartedProcess()
public
testCheckTimeoutOnStartedProcess() : mixed
Tags
testCheckTimeoutOnTerminatedProcess()
public
testCheckTimeoutOnTerminatedProcess() : mixed
testDisableOutputDisablesTheOutput()
public
testDisableOutputDisablesTheOutput() : mixed
testDisableOutputWhileIdleTimeoutIsSet()
public
testDisableOutputWhileIdleTimeoutIsSet() : mixed
Tags
testDisableOutputWhileRunningThrowsException()
public
testDisableOutputWhileRunningThrowsException() : mixed
Tags
testEnableOrDisableOutputAfterRunDoesNotThrowException()
public
testEnableOrDisableOutputAfterRunDoesNotThrowException() : mixed
testEnableOutputWhileRunningThrowsException()
public
testEnableOutputWhileRunningThrowsException() : mixed
Tags
testEnvArgument()
public
testEnvArgument() : mixed
testEnvBackupDoesNotDeleteExistingVars()
public
testEnvBackupDoesNotDeleteExistingVars() : mixed
testEnvIsInherited()
public
testEnvIsInherited() : mixed
testEscapeArgument()
public
testEscapeArgument(mixed $arg) : mixed
Parameters
- $arg : mixed
Tags
testEscapeArgumentWhenInheritEnvDisabled()
public
testEscapeArgumentWhenInheritEnvDisabled(mixed $arg) : mixed
Parameters
- $arg : mixed
Tags
testExitCodeCommandFailed()
public
testExitCodeCommandFailed() : mixed
testExitCodeIsAvailableAfterSignal()
public
testExitCodeIsAvailableAfterSignal() : mixed
Tags
testExitCodeText()
public
testExitCodeText() : mixed
testExitCodeTextIsNullWhenExitCodeIsNull()
public
testExitCodeTextIsNullWhenExitCodeIsNull() : mixed
testFloatAndNullTimeout()
public
testFloatAndNullTimeout() : mixed
testFlushErrorOutput()
public
testFlushErrorOutput() : mixed
testFlushOutput()
public
testFlushOutput() : mixed
testGetCommandLine()
public
testGetCommandLine() : mixed
testGetErrorOutput()
public
testGetErrorOutput() : mixed
testGetExitCode()
public
testGetExitCode() : mixed
testGetExitCodeIsNullOnStart()
public
testGetExitCodeIsNullOnStart() : mixed
testGetExitCodeIsNullOnWhenStartingAgain()
public
testGetExitCodeIsNullOnWhenStartingAgain() : mixed
testGetOutput()
public
testGetOutput() : mixed
testGetOutputWhileDisabled()
public
testGetOutputWhileDisabled(mixed $fetchMethod) : mixed
Parameters
- $fetchMethod : mixed
Tags
testGetPid()
public
testGetPid() : mixed
testGetPidIsNullAfterRun()
public
testGetPidIsNullAfterRun() : mixed
testGetPidIsNullBeforeStart()
public
testGetPidIsNullBeforeStart() : mixed
testIdleTimeout()
public
testIdleTimeout() : mixed
testIdleTimeoutNotExceededWhenOutputIsSent()
public
testIdleTimeoutNotExceededWhenOutputIsSent() : mixed
testIncrementalOutput()
public
testIncrementalOutput(mixed $getOutput, mixed $getIncrementalOutput, mixed $uri) : mixed
Parameters
- $getOutput : mixed
- $getIncrementalOutput : mixed
- $uri : mixed
Tags
testIncrementalOutputDoesNotRequireAnotherCall()
public
testIncrementalOutputDoesNotRequireAnotherCall(mixed $stream, mixed $method) : mixed
Parameters
- $stream : mixed
- $method : mixed
Tags
testInheritEnvDisabled()
public
testInheritEnvDisabled() : mixed
Tags
testInputStreamOnEmpty()
public
testInputStreamOnEmpty() : mixed
testInputStreamWithCallable()
public
testInputStreamWithCallable() : mixed
testInputStreamWithGenerator()
public
testInputStreamWithGenerator() : mixed
testInvalidInput()
public
testInvalidInput(mixed $value) : mixed
Parameters
- $value : mixed
Tags
testIsNotSuccessful()
public
testIsNotSuccessful() : mixed
testIsSuccessful()
public
testIsSuccessful() : mixed
testIsSuccessfulOnlyAfterTerminated()
public
testIsSuccessfulOnlyAfterTerminated() : mixed
testIterateOverProcessWithTimeout()
public
testIterateOverProcessWithTimeout() : mixed
Tags
testIteratorInput()
public
testIteratorInput() : mixed
testIteratorOutput()
public
testIteratorOutput() : mixed
testKillSignalTerminatesProcessCleanly()
public
testKillSignalTerminatesProcessCleanly() : mixed
testLiveStreamAsInput()
public
testLiveStreamAsInput() : mixed
testMethodsThatNeedARunningProcess()
public
testMethodsThatNeedARunningProcess(mixed $method) : mixed
Parameters
- $method : mixed
Tags
testMethodsThatNeedATerminatedProcess()
public
testMethodsThatNeedATerminatedProcess(mixed $method) : mixed
Parameters
- $method : mixed
Tags
testMustRun()
public
testMustRun() : mixed
testMustRunThrowsException()
public
testMustRunThrowsException() : mixed
Tags
testNegativeTimeoutFromConstructor()
public
testNegativeTimeoutFromConstructor() : mixed
Tags
testNegativeTimeoutFromSetter()
public
testNegativeTimeoutFromSetter() : mixed
Tags
testNonBlockingNorClearingIteratorOutput()
public
testNonBlockingNorClearingIteratorOutput() : mixed
testProcessIsNotSignaled()
public
testProcessIsNotSignaled() : mixed
testProcessIsSignaledIfStopped()
public
testProcessIsSignaledIfStopped() : mixed
testProcessPipes()
tests results from sub processes.
public
testProcessPipes(mixed $code, mixed $size) : mixed
Parameters
- $code : mixed
- $size : mixed
Tags
testProcessResponses()
tests results from sub processes.
public
testProcessResponses(mixed $expected, mixed $getter, mixed $code) : mixed
Parameters
- $expected : mixed
- $getter : mixed
- $code : mixed
Tags
testProcessThrowsExceptionWhenExternallySignaled()
public
testProcessThrowsExceptionWhenExternallySignaled() : mixed
Tags
testProcessWithoutTermSignal()
public
testProcessWithoutTermSignal() : mixed
testPTYCommand()
public
testPTYCommand() : mixed
testRawCommandLine()
public
testRawCommandLine() : mixed
testRestart()
public
testRestart() : mixed
testRunProcessWithTimeout()
public
testRunProcessWithTimeout() : mixed
Tags
testSetBadEnv()
public
testSetBadEnv() : mixed
testSetIdleTimeoutWhileOutputIsDisabled()
public
testSetIdleTimeoutWhileOutputIsDisabled() : mixed
Tags
testSetInputWhileRunningThrowsAnException()
public
testSetInputWhileRunningThrowsAnException() : mixed
Tags
testSetNullIdleTimeoutWhileOutputIsDisabled()
public
testSetNullIdleTimeoutWhileOutputIsDisabled() : mixed
testSetStreamAsInput()
public
testSetStreamAsInput(mixed $code, mixed $size) : mixed
Parameters
- $code : mixed
- $size : mixed
Tags
testSignal()
public
testSignal() : mixed
Tags
testSignalProcessNotRunning()
public
testSignalProcessNotRunning() : mixed
Tags
testSimpleInputStream()
public
testSimpleInputStream() : mixed
testStartAfterATimeout()
public
testStartAfterATimeout() : mixed
Tags
testStartIsNonBlocking()
public
testStartIsNonBlocking() : mixed
testStatus()
public
testStatus() : mixed
testStop()
public
testStop() : mixed
testStopTerminatesProcessCleanly()
public
testStopTerminatesProcessCleanly() : mixed
testStopWithTimeoutIsActuallyWorking()
public
testStopWithTimeoutIsActuallyWorking() : mixed
Tags
testSuccessfulMustRunHasCorrectExitCode()
public
testSuccessfulMustRunHasCorrectExitCode() : mixed
testTermSignalTerminatesProcessCleanly()
public
testTermSignalTerminatesProcessCleanly() : mixed
testThatProcessDoesNotThrowWarningDuringRun()
public
testThatProcessDoesNotThrowWarningDuringRun() : mixed
testTTYCommand()
public
testTTYCommand() : mixed
Tags
testTTYCommandExitCode()
public
testTTYCommandExitCode() : mixed
Tags
testTTYInWindowsEnvironment()
public
testTTYInWindowsEnvironment() : mixed
Tags
testUpdateStatus()
public
testUpdateStatus() : mixed
testValidInput()
public
testValidInput(mixed $expected, mixed $value) : mixed
Parameters
- $expected : mixed
- $value : mixed
Tags
testWrongSignal()
public
testWrongSignal(mixed $signal) : mixed
Parameters
- $signal : mixed
Tags
testZeroAsOutput()
public
testZeroAsOutput() : mixed
tearDown()
protected
tearDown() : mixed
getProcess()
private
getProcess(string $commandline[, null|string $cwd = null ][, null|array<string|int, mixed> $env = null ][, null|string $input = null ][, int $timeout = 60 ]) : Process
Parameters
- $commandline : string
- $cwd : null|string = null
- $env : null|array<string|int, mixed> = null
- $input : null|string = null
- $timeout : int = 60
Return values
ProcessgetProcessForCode()
private
getProcessForCode(mixed $code[, mixed $cwd = null ][, array<string|int, mixed> $env = null ][, mixed $input = null ][, mixed $timeout = 60 ]) : Process
Parameters
- $code : mixed
- $cwd : mixed = null
- $env : array<string|int, mixed> = null
- $input : mixed = null
- $timeout : mixed = 60
Return values
ProcessskipIfNotEnhancedSigchild()
private
skipIfNotEnhancedSigchild([mixed $expectException = true ]) : mixed
Parameters
- $expectException : mixed = true