PHP Class PhpBench\Tests\System\RunTest

Inheritance: extends SystemTestCase
Exibir arquivo Open project: dantleech/phpbench

Public Methods

Method Description
provideOutputs ( )
provideProgressLoggers ( )
testCommand ( ) It should run when given a path.
testCommandWithNoPath ( ) It should show an error if no path is given (and no path is configured).
testCommandWithReport ( ) It should run and generate a named report.
testCommandWithReportConfiguration ( ) It should run and generate a report configuration.
testCommandWithReportConfigurationInvalid ( ) It should fail if an invalid report configuration is given.
testCommandWithReportConfigurationUnknown ( ) It should fail if an unknown report name is given.
testConfigBootstrapRelativity ( ) It should load the configured bootstrap relative to the config file.
testDumpXml ( ) It should dump none to an XML file.
testDumpXmlStdOut ( ) It should dump to stdout.
testGroups ( ) It should run specified groups.
testIterationErrorExitCode ( ) It should exit with code "1" if an exception is encountered while running the iterations.
testIterationStopOnError ( ) It should stop on the first exception if an exceptio is encountered.
testOutputs ( $output ) It should generate in different output formats.
testOverrideBootstrap ( ) It should override the bootstrap file.
testOverrideIterations ( ) Its should allow the number of iterations to be specified.
testOverrideMode ( ) Its should allow the mode to be specified.
testOverrideParameters ( ) It should accept explicit parameters.
testOverrideParametersInvalidJson ( ) It should throw an exception if an invalid JSON string is provided for parameters.
testOverrideRevolutions ( ) It should override revolutions.
testOverrideTimeUnit ( ) Its should allow the time unit to be specified.
testPhpBenchConfig ( ) It should use phpbench.json if present It should prioritize phpbench.json over .phpbench.dist.json.
testPhpBenchDistConfig ( ) It should use phpbench.json.dist if present.
testPhpEnvOptions ( ) It should set the PHP binary, wrapper and config.
testPrecision ( ) It should allow the precision to be set.
testProgressLogger ( $progress ) It can have the progress logger specified.
testRetryThreshold ( ) It should set the retry threshold.
testSetBootstrap ( ) It should set the bootstrap file.
testSetBootstrapShort ( ) It should set the bootstrap using the short option.
testSetConflictBootstrap ( ) It should set the bootstrap file which contains variables that conflict with the script templates.
testSleep ( ) It should set the sleep option.
testSpecifiedConfig ( ) It should use a speified, valid, configuration.
testStore ( ) It should request that the suite result to be stored.
testZeroTimedIterations ( ) It should not crash when zeros are reported as times.

Method Details

provideOutputs() public method

public provideOutputs ( )

provideProgressLoggers() public method

testCommand() public method

It should show the default (simple) report.
public testCommand ( )

testCommandWithNoPath() public method

It should show an error if no path is given (and no path is configured).

testCommandWithReport() public method

It should run and generate a named report.

testCommandWithReportConfiguration() public method

It should run and generate a report configuration.

testCommandWithReportConfigurationInvalid() public method

It should fail if an invalid report configuration is given.

testCommandWithReportConfigurationUnknown() public method

It should fail if an unknown report name is given.

testConfigBootstrapRelativity() public method

It should load the configured bootstrap relative to the config file.

testDumpXml() public method

It should dump none to an XML file.
public testDumpXml ( )

testDumpXmlStdOut() public method

It should dump to stdout.
public testDumpXmlStdOut ( )

testGroups() public method

It should run specified groups.
public testGroups ( )

testIterationErrorExitCode() public method

It should exit with code "1" if an exception is encountered while running the iterations.

testIterationStopOnError() public method

It should stop on the first exception if an exceptio is encountered.

testOutputs() public method

It should generate in different output formats.
public testOutputs ( $output )

testOverrideBootstrap() public method

It should override the bootstrap file.

testOverrideIterations() public method

Its should allow the number of iterations to be specified.

testOverrideMode() public method

Its should allow the mode to be specified.
public testOverrideMode ( )

testOverrideParameters() public method

It should accept explicit parameters.

testOverrideParametersInvalidJson() public method

It should throw an exception if an invalid JSON string is provided for parameters.

testOverrideRevolutions() public method

It should override revolutions.

testOverrideTimeUnit() public method

Its should allow the time unit to be specified.

testPhpBenchConfig() public method

It should use phpbench.json if present It should prioritize phpbench.json over .phpbench.dist.json.
public testPhpBenchConfig ( )

testPhpBenchDistConfig() public method

It should use phpbench.json.dist if present.

testPhpEnvOptions() public method

It should set the PHP binary, wrapper and config.
public testPhpEnvOptions ( )

testPrecision() public method

It should allow the precision to be set.
public testPrecision ( )

testProgressLogger() public method

TODO: Make this a separate test and assert the output.
public testProgressLogger ( $progress )

testRetryThreshold() public method

It should set the retry threshold.
public testRetryThreshold ( )

testSetBootstrap() public method

It should set the bootstrap file.
public testSetBootstrap ( )

testSetBootstrapShort() public method

It should set the bootstrap using the short option.

testSetConflictBootstrap() public method

It should set the bootstrap file which contains variables that conflict with the script templates.

testSleep() public method

It should set the sleep option.
public testSleep ( )

testSpecifiedConfig() public method

It should use a speified, valid, configuration.
public testSpecifiedConfig ( )

testStore() public method

It should request that the suite result to be stored.
public testStore ( )

testZeroTimedIterations() public method

It should not crash when zeros are reported as times.