Overview

Namespaces

  • Evenement
  • None
  • Peridot
    • Console
    • Core
    • Reporter
    • Runner
    • Scope
    • Test
  • Symfony
    • Component
      • Console
        • Command
        • Descriptor
        • Event
        • Exception
        • Formatter
        • Helper
        • Input
        • Logger
        • Output
        • Question
        • Style
        • Tester
        • Tests
          • Command
          • Descriptor
          • Fixtures
          • Formatter
          • Helper
          • Input
          • Logger
          • Output
          • Style
          • Tester

Classes

  • ApplicationTester
  • CommandTester
  • Overview
  • Namespace
  • Class

Class ApplicationTester

Eases the testing of console applications.

When testing an application, don't forget to disable the auto exit flag: $application = new Application(); $application->setAutoExit(false);

Namespace: Symfony\Component\Console\Tester
Author: Fabien Potencier fabien@symfony.com
Located at Tester/ApplicationTester.php
Methods summary
public
# __construct( Symfony\Component\Console\Application $application )

Constructor.

Constructor.

Parameters

$application
An Application instance to test
public integer
# run( array $input, array $options = array() )

Executes the application.

Executes the application.

Available options: * interactive: Sets the input interactive flag * decorated: Sets the output decorated flag * verbosity: Sets the output verbosity flag

Parameters

$input
An array of arguments and options
$options
An array of options

Returns

integer
The command exit code
public string
# getDisplay( boolean $normalize = false )

Gets the display returned by the last execution of the application.

Gets the display returned by the last execution of the application.

Parameters

$normalize
Whether to normalize end of lines to \n or not

Returns

string
The display
public Symfony\Component\Console\Input\InputInterface
# getInput( )

Gets the input instance used by the last execution of the application.

Gets the input instance used by the last execution of the application.

Returns

Symfony\Component\Console\Input\InputInterface
The current input instance
public Symfony\Component\Console\Output\OutputInterface
# getOutput( )

Gets the output instance used by the last execution of the application.

Gets the output instance used by the last execution of the application.

Returns

Symfony\Component\Console\Output\OutputInterface
The current output instance
public integer
# getStatusCode( )

Gets the status code returned by the last execution of the application.

Gets the status code returned by the last execution of the application.

Returns

integer
The status code
Peridot API documentation generated by ApiGen