Documentation

ProcessTest extends TestCase
in package

Tags
author

Robert Schönthal seroscho@googlemail.com

Table of Contents

$notEnhancedSigchild  : mixed
$phpBin  : mixed
$process  : mixed
$sigchild  : mixed
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
testInvalidCwd()  : 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
testWaitStoppedDeadProcess()  : mixed
testWrongSignal()  : mixed
testZeroAsOutput()  : mixed
tearDown()  : mixed
getProcess()  : Process
getProcessForCode()  : Process
skipIfNotEnhancedSigchild()  : mixed

Properties

$notEnhancedSigchild

private static mixed $notEnhancedSigchild = false

Methods

chainedCommandsOutputProvider()

public chainedCommandsOutputProvider() : mixed
Return values
mixed —

pipesCodeProvider()

public pipesCodeProvider() : mixed
Return values
mixed —

provideEscapeArgument()

public provideEscapeArgument() : mixed
Return values
mixed —

provideIncrementalOutput()

public provideIncrementalOutput() : mixed
Return values
mixed —

provideInputValues()

public provideInputValues() : mixed
Return values
mixed —

provideInvalidInputValues()

public provideInvalidInputValues() : mixed
Return values
mixed —

provideMethodsThatNeedARunningProcess()

public provideMethodsThatNeedARunningProcess() : mixed
Return values
mixed —

provideMethodsThatNeedATerminatedProcess()

public provideMethodsThatNeedATerminatedProcess() : mixed
Return values
mixed —

provideOutputFetchingMethods()

public provideOutputFetchingMethods() : mixed
Return values
mixed —

provideVariousIncrementals()

public provideVariousIncrementals() : mixed
Return values
mixed —

provideWrongSignal()

public provideWrongSignal() : mixed
Return values
mixed —

responsesCodeProvider()

public responsesCodeProvider() : mixed
Return values
mixed —

setUpBeforeClass()

public static setUpBeforeClass() : mixed
Return values
mixed —

testAllOutputIsActuallyReadOnTermination()

public testAllOutputIsActuallyReadOnTermination() : mixed
Return values
mixed —

testCallbackIsExecutedForOutput()

public testCallbackIsExecutedForOutput() : mixed
Return values
mixed —

testCallbackIsExecutedForOutputWheneverOutputIsDisabled()

public testCallbackIsExecutedForOutputWheneverOutputIsDisabled() : mixed
Return values
mixed —

testCallbacksAreExecutedWithStart()

public testCallbacksAreExecutedWithStart() : mixed
Return values
mixed —

testChainedCommandsOutput()

public testChainedCommandsOutput(mixed $expected, mixed $operator, mixed $input) : mixed
Parameters
$expected : mixed
$operator : mixed
$input : mixed
Tags
dataProvider

chainedCommandsOutputProvider

Return values
mixed —

testChainedProcesses()

public testChainedProcesses() : mixed
Return values
mixed —

testCheckTimeoutOnNonStartedProcess()

public testCheckTimeoutOnNonStartedProcess() : mixed
Return values
mixed —

testCheckTimeoutOnStartedProcess()

public testCheckTimeoutOnStartedProcess() : mixed
Return values
mixed —

testCheckTimeoutOnTerminatedProcess()

public testCheckTimeoutOnTerminatedProcess() : mixed
Return values
mixed —

testDisableOutputDisablesTheOutput()

public testDisableOutputDisablesTheOutput() : mixed
Return values
mixed —

testDisableOutputWhileIdleTimeoutIsSet()

public testDisableOutputWhileIdleTimeoutIsSet() : mixed
Return values
mixed —

testDisableOutputWhileRunningThrowsException()

public testDisableOutputWhileRunningThrowsException() : mixed
Return values
mixed —

testEnableOrDisableOutputAfterRunDoesNotThrowException()

public testEnableOrDisableOutputAfterRunDoesNotThrowException() : mixed
Return values
mixed —

testEnableOutputWhileRunningThrowsException()

public testEnableOutputWhileRunningThrowsException() : mixed
Return values
mixed —

testEnvArgument()

public testEnvArgument() : mixed
Return values
mixed —

testEnvBackupDoesNotDeleteExistingVars()

public testEnvBackupDoesNotDeleteExistingVars() : mixed
Return values
mixed —

testEnvIsInherited()

public testEnvIsInherited() : mixed
Return values
mixed —

testEscapeArgument()

public testEscapeArgument(mixed $arg) : mixed
Parameters
$arg : mixed
Tags
dataProvider

provideEscapeArgument

Return values
mixed —

testEscapeArgumentWhenInheritEnvDisabled()

public testEscapeArgumentWhenInheritEnvDisabled(mixed $arg) : mixed
Parameters
$arg : mixed
Tags
dataProvider

provideEscapeArgument

group

legacy

Return values
mixed —

testExitCodeCommandFailed()

public testExitCodeCommandFailed() : mixed
Return values
mixed —

testExitCodeIsAvailableAfterSignal()

public testExitCodeIsAvailableAfterSignal() : mixed
Tags
requires

extension pcntl

Return values
mixed —

testExitCodeText()

public testExitCodeText() : mixed
Return values
mixed —

testExitCodeTextIsNullWhenExitCodeIsNull()

public testExitCodeTextIsNullWhenExitCodeIsNull() : mixed
Return values
mixed —

testFloatAndNullTimeout()

public testFloatAndNullTimeout() : mixed
Return values
mixed —

testFlushErrorOutput()

public testFlushErrorOutput() : mixed
Return values
mixed —

testFlushOutput()

public testFlushOutput() : mixed
Return values
mixed —

testGetCommandLine()

public testGetCommandLine() : mixed
Return values
mixed —

testGetErrorOutput()

public testGetErrorOutput() : mixed
Return values
mixed —

testGetExitCode()

public testGetExitCode() : mixed
Return values
mixed —

testGetExitCodeIsNullOnStart()

public testGetExitCodeIsNullOnStart() : mixed
Return values
mixed —

testGetExitCodeIsNullOnWhenStartingAgain()

public testGetExitCodeIsNullOnWhenStartingAgain() : mixed
Return values
mixed —

testGetOutput()

public testGetOutput() : mixed
Return values
mixed —

testGetOutputWhileDisabled()

public testGetOutputWhileDisabled(mixed $fetchMethod) : mixed
Parameters
$fetchMethod : mixed
Tags
dataProvider

provideOutputFetchingMethods

Return values
mixed —

testGetPid()

public testGetPid() : mixed
Return values
mixed —

testGetPidIsNullAfterRun()

public testGetPidIsNullAfterRun() : mixed
Return values
mixed —

testGetPidIsNullBeforeStart()

public testGetPidIsNullBeforeStart() : mixed
Return values
mixed —

testIdleTimeout()

public testIdleTimeout() : mixed
Return values
mixed —

testIdleTimeoutNotExceededWhenOutputIsSent()

public testIdleTimeoutNotExceededWhenOutputIsSent() : mixed
Return values
mixed —

testIncrementalOutput()

public testIncrementalOutput(mixed $getOutput, mixed $getIncrementalOutput, mixed $uri) : mixed
Parameters
$getOutput : mixed
$getIncrementalOutput : mixed
$uri : mixed
Tags
dataProvider

provideIncrementalOutput

Return values
mixed —

testIncrementalOutputDoesNotRequireAnotherCall()

public testIncrementalOutputDoesNotRequireAnotherCall(mixed $stream, mixed $method) : mixed
Parameters
$stream : mixed
$method : mixed
Tags
dataProvider

provideVariousIncrementals

Return values
mixed —

testInheritEnvDisabled()

public testInheritEnvDisabled() : mixed
Tags
group

legacy

Return values
mixed —

testInputStreamOnEmpty()

public testInputStreamOnEmpty() : mixed
Return values
mixed —

testInputStreamWithCallable()

public testInputStreamWithCallable() : mixed
Return values
mixed —

testInputStreamWithGenerator()

public testInputStreamWithGenerator() : mixed
Return values
mixed —

testInvalidCwd()

public testInvalidCwd() : mixed
Tags
group

legacy

expectedDeprecation

The provided cwd does not exist. Command is currently ran against getcwd(). This behavior is deprecated since Symfony 3.4 and will be removed in 4.0.

Return values
mixed —

testInvalidInput()

public testInvalidInput(mixed $value) : mixed
Parameters
$value : mixed
Tags
dataProvider

provideInvalidInputValues

Return values
mixed —

testIsNotSuccessful()

public testIsNotSuccessful() : mixed
Return values
mixed —

testIsSuccessful()

public testIsSuccessful() : mixed
Return values
mixed —

testIsSuccessfulOnlyAfterTerminated()

public testIsSuccessfulOnlyAfterTerminated() : mixed
Return values
mixed —

testIterateOverProcessWithTimeout()

public testIterateOverProcessWithTimeout() : mixed
Return values
mixed —

testIteratorInput()

public testIteratorInput() : mixed
Return values
mixed —

testIteratorOutput()

public testIteratorOutput() : mixed
Return values
mixed —

testKillSignalTerminatesProcessCleanly()

public testKillSignalTerminatesProcessCleanly() : mixed
Return values
mixed —

testLiveStreamAsInput()

public testLiveStreamAsInput() : mixed
Return values
mixed —

testMethodsThatNeedARunningProcess()

public testMethodsThatNeedARunningProcess(mixed $method) : mixed
Parameters
$method : mixed
Tags
dataProvider

provideMethodsThatNeedARunningProcess

Return values
mixed —

testMethodsThatNeedATerminatedProcess()

public testMethodsThatNeedATerminatedProcess(mixed $method) : mixed
Parameters
$method : mixed
Tags
dataProvider

provideMethodsThatNeedATerminatedProcess

Return values
mixed —

testMustRun()

public testMustRun() : mixed
Return values
mixed —

testMustRunThrowsException()

public testMustRunThrowsException() : mixed
Return values
mixed —

testNegativeTimeoutFromConstructor()

public testNegativeTimeoutFromConstructor() : mixed
Return values
mixed —

testNegativeTimeoutFromSetter()

public testNegativeTimeoutFromSetter() : mixed
Return values
mixed —

testNonBlockingNorClearingIteratorOutput()

public testNonBlockingNorClearingIteratorOutput() : mixed
Return values
mixed —

testProcessIsNotSignaled()

public testProcessIsNotSignaled() : mixed
Return values
mixed —

testProcessIsSignaledIfStopped()

public testProcessIsSignaledIfStopped() : mixed
Return values
mixed —

testProcessPipes()

tests results from sub processes.

public testProcessPipes(mixed $code, mixed $size) : mixed
Parameters
$code : mixed
$size : mixed
Tags
dataProvider

pipesCodeProvider

Return values
mixed —

testProcessResponses()

tests results from sub processes.

public testProcessResponses(mixed $expected, mixed $getter, mixed $code) : mixed
Parameters
$expected : mixed
$getter : mixed
$code : mixed
Tags
dataProvider

responsesCodeProvider

Return values
mixed —

testProcessThrowsExceptionWhenExternallySignaled()

public testProcessThrowsExceptionWhenExternallySignaled() : mixed
Return values
mixed —

testProcessWithoutTermSignal()

public testProcessWithoutTermSignal() : mixed
Return values
mixed —

testPTYCommand()

public testPTYCommand() : mixed
Return values
mixed —

testRawCommandLine()

public testRawCommandLine() : mixed
Return values
mixed —

testRestart()

public testRestart() : mixed
Return values
mixed —

testRunProcessWithTimeout()

public testRunProcessWithTimeout() : mixed
Return values
mixed —

testSetBadEnv()

public testSetBadEnv() : mixed
Return values
mixed —

testSetIdleTimeoutWhileOutputIsDisabled()

public testSetIdleTimeoutWhileOutputIsDisabled() : mixed
Return values
mixed —

testSetInputWhileRunningThrowsAnException()

public testSetInputWhileRunningThrowsAnException() : mixed
Return values
mixed —

testSetNullIdleTimeoutWhileOutputIsDisabled()

public testSetNullIdleTimeoutWhileOutputIsDisabled() : mixed
Return values
mixed —

testSetStreamAsInput()

public testSetStreamAsInput(mixed $code, mixed $size) : mixed
Parameters
$code : mixed
$size : mixed
Tags
dataProvider

pipesCodeProvider

Return values
mixed —

testSignal()

public testSignal() : mixed
Tags
requires

extension pcntl

Return values
mixed —

testSignalProcessNotRunning()

public testSignalProcessNotRunning() : mixed
Return values
mixed —

testSimpleInputStream()

public testSimpleInputStream() : mixed
Return values
mixed —

testStartAfterATimeout()

public testStartAfterATimeout() : mixed
Return values
mixed —

testStartIsNonBlocking()

public testStartIsNonBlocking() : mixed
Return values
mixed —

testStatus()

public testStatus() : mixed
Return values
mixed —

testStop()

public testStop() : mixed
Return values
mixed —

testStopTerminatesProcessCleanly()

public testStopTerminatesProcessCleanly() : mixed
Return values
mixed —

testStopWithTimeoutIsActuallyWorking()

public testStopWithTimeoutIsActuallyWorking() : mixed
Tags
requires

extension pcntl

Return values
mixed —

testSuccessfulMustRunHasCorrectExitCode()

public testSuccessfulMustRunHasCorrectExitCode() : mixed
Return values
mixed —

testTermSignalTerminatesProcessCleanly()

public testTermSignalTerminatesProcessCleanly() : mixed
Return values
mixed —

testThatProcessDoesNotThrowWarningDuringRun()

public testThatProcessDoesNotThrowWarningDuringRun() : mixed
Return values
mixed —

testTTYCommand()

public testTTYCommand() : mixed
Return values
mixed —

testTTYCommandExitCode()

public testTTYCommandExitCode() : mixed
Return values
mixed —

testTTYInWindowsEnvironment()

public testTTYInWindowsEnvironment() : mixed
Return values
mixed —

testUpdateStatus()

public testUpdateStatus() : mixed
Return values
mixed —

testValidInput()

public testValidInput(mixed $expected, mixed $value) : mixed
Parameters
$expected : mixed
$value : mixed
Tags
dataProvider

provideInputValues

Return values
mixed —

testWaitStoppedDeadProcess()

public testWaitStoppedDeadProcess() : mixed
Return values
mixed —

testWrongSignal()

public testWrongSignal(mixed $signal) : mixed
Parameters
$signal : mixed
Tags
dataProvider

provideWrongSignal

Return values
mixed —

testZeroAsOutput()

public testZeroAsOutput() : mixed
Return values
mixed —

tearDown()

protected tearDown() : mixed
Return values
mixed —

getProcess()

private getProcess(string $commandline[, string|null $cwd = null ][, array<string|int, mixed> $env = null ][, string|null $input = null ][, int $timeout = 60 ]) : Process
Parameters
$commandline : string
$cwd : string|null = null
$env : array<string|int, mixed> = null
$input : string|null = null
$timeout : int = 60
Return values
Process —

getProcessForCode()

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
Process —

skipIfNotEnhancedSigchild()

private skipIfNotEnhancedSigchild([mixed $expectException = true ]) : mixed
Parameters
$expectException : mixed = true
Return values
mixed —

Search results