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

  • ApplicationTest
  • CustomApplication
  • CustomDefaultCommandApplication
  • Overview
  • Namespace
  • Class

Class ApplicationTest

PHPUnit_Framework_TestCase
Extended by Symfony\Component\Console\Tests\ApplicationTest
Namespace: Symfony\Component\Console\Tests
Located at Tests/ApplicationTest.php
Methods summary
public static
# setUpBeforeClass( )
protected
# normalizeLineBreaks( $text )
protected
# ensureStaticCommandHelp( Symfony\Component\Console\Application $application )

Replaces the dynamic placeholders of the command help text with a static version. The placeholder %command.full_name% includes the script path that is not predictable and can not be tested against.

Replaces the dynamic placeholders of the command help text with a static version. The placeholder %command.full_name% includes the script path that is not predictable and can not be tested against.

public
# testConstructor( )
public
# testSetGetName( )
public
# testSetGetVersion( )
public
# testGetLongVersion( )
public
# testHelp( )
public
# testAll( )
public
# testRegister( )
public
# testAdd( )
public
# testAddCommandWithEmptyConstructor( )

Expectedexception

\LogicException

Expectedexceptionmessage

Command class "Foo5Command" is not correctly initialized. You probably forgot to call the parent constructor.
public
# testHasGet( )
public
# testSilentHelp( )
public
# testGetInvalidCommand( )

Expectedexception

\Symfony\Component\Console\Exception\CommandNotFoundException

Expectedexceptionmessage

The command "foofoo" does not exist.
public
# testGetNamespaces( )
public
# testFindNamespace( )
public
# testFindNamespaceWithSubnamespaces( )
public
# testFindAmbiguousNamespace( )

Expectedexception

\Symfony\Component\Console\Exception\CommandNotFoundException

Expectedexceptionmessage

The namespace "f" is ambiguous (foo, foo1).
public
# testFindInvalidNamespace( )

Expectedexception

\Symfony\Component\Console\Exception\CommandNotFoundException

Expectedexceptionmessage

There are no commands defined in the "bar" namespace.
public
# testFindUniqueNameButNamespaceName( )

Expectedexception

\Symfony\Component\Console\Exception\CommandNotFoundException

Expectedexceptionmessage

Command "foo1" is not defined
public
# testFind( )
public
# testFindWithAmbiguousAbbreviations( $abbreviation, $expectedExceptionMessage )

Dataprovider

provideAmbiguousAbbreviations
public
# provideAmbiguousAbbreviations( )
public
# testFindCommandEqualNamespace( )
public
# testFindCommandWithAmbiguousNamespacesButUniqueName( )
public
# testFindCommandWithMissingNamespace( )
public
# testFindAlternativeExceptionMessageSingle( $name )

Dataprovider

provideInvalidCommandNamesSingle

Expectedexception

\Symfony\Component\Console\Exception\CommandNotFoundException

Expectedexceptionmessage

Did you mean this
public
# provideInvalidCommandNamesSingle( )
public
# testFindAlternativeExceptionMessageMultiple( )
public
# testFindAlternativeCommands( )
public
# testFindAlternativeCommandsWithAnAlias( )
public
# testFindAlternativeNamespace( )
public
# testFindNamespaceDoesNotFailOnDeepSimilarNamespaces( )
public
# testFindWithDoubleColonInNameThrowsException( )

Expectedexception

\Symfony\Component\Console\Exception\CommandNotFoundException

Expectedexceptionmessage

Command "foo::bar" is not defined.
public
# testSetCatchExceptions( )
public
# testLegacyAsText( )

Group

legacy
public
# testLegacyAsXml( )

Group

legacy
public
# testRenderException( )
public
# testRenderExceptionWithDoubleWidthCharacters( )
public
# testRun( )
public
# testVerboseValueNotBreakArguments( )

Issue #9285.

Issue #9285.

If the "verbose" option is just before an argument in ArgvInput, an argument value should not be treated as verbosity value. This test will fail with "Not enough arguments." if broken

public
# testRunReturnsIntegerExitCode( )
public
# testRunReturnsExitCodeOneForExceptionCodeZero( )
public
# testAddingOptionWithDuplicateShortcut( )

Expectedexception

\LogicException

Expectedexceptionmessage

An option with shortcut "e" already exists.
public
# testAddingAlreadySetDefinitionElementData( $def )

Dataprovider

getAddingAlreadySetDefinitionElementData

Expectedexception

\LogicException
public
# getAddingAlreadySetDefinitionElementData( )
public
# testGetDefaultHelperSetReturnsDefaultValues( )
public
# testAddingSingleHelperSetOverwritesDefaultValues( )
public
# testOverwritingDefaultHelperSetOverwritesDefaultValues( )
public
# testGetDefaultInputDefinitionReturnsDefaultValues( )
public
# testOverwritingDefaultInputDefinitionOverwritesDefaultValues( )
public
# testSettingCustomInputDefinitionOverwritesDefaultValues( )
public
# testRunWithDispatcher( )
public
# testRunWithExceptionAndDispatcher( )

Expectedexception

\LogicException

Expectedexceptionmessage

caught
public
# testRunDispatchesAllEventsWithException( )
public
# testRunWithErrorAndDispatcher( )

Expectedexception

\LogicException

Expectedexceptionmessage

caught
public
# testRunDispatchesAllEventsWithError( )
public
# testRunWithErrorFailingStatusCode( )
public
# testRunWithDispatcherSkippingCommand( )
public
# testRunWithDispatcherAccessingInputOptions( )
public
# testRunWithDispatcherAddingInputOptions( )
public
# testTerminalDimensions( )
protected
# getDispatcher( $skipCommand = false )
public
# testSetRunCustomDefaultCommand( )
public
# testCanCheckIfTerminalIsInteractive( )

Requires

function posix_isatty
Properties summary
protected static $fixturesPath
#
Peridot API documentation generated by ApiGen