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 CommandTester

Eases the testing of console commands.

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

Constructor.

Constructor.

Parameters

$command
A Command instance to test
public integer
# execute( array $input, array $options = array() )

Executes the command.

Executes the command.

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

Parameters

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

Returns

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

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

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

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 command.

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

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 command.

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

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