Documentation

ApplicationTest extends TestCase
in package

Table of Contents

Properties

$fixturesPath  : mixed

Methods

getAddingAlreadySetDefinitionElementData()  : mixed
provideAmbiguousAbbreviations()  : mixed
provideInvalidCommandNamesSingle()  : mixed
setUpBeforeClass()  : mixed
testAdd()  : mixed
testAddCommandWithEmptyConstructor()  : mixed
testAddingAlreadySetDefinitionElementData()  : mixed
testAddingOptionWithDuplicateShortcut()  : mixed
testAddingSingleHelperSetOverwritesDefaultValues()  : mixed
testAll()  : mixed
testAutoExitSetting()  : mixed
testCanCheckIfTerminalIsInteractive()  : mixed
testConsoleErrorEventIsTriggeredOnCommandNotFound()  : mixed
testConstructor()  : mixed
testErrorIsRethrownIfNotHandledByConsoleErrorEvent()  : mixed
testErrorIsRethrownIfNotHandledByConsoleErrorEventWithCatchingEnabled()  : mixed
testFind()  : mixed
testFindAlternativeCommands()  : mixed
testFindAlternativeCommandsWithAnAlias()  : mixed
testFindAlternativeExceptionMessageMultiple()  : mixed
testFindAlternativeExceptionMessageSingle()  : mixed
testFindAlternativeNamespace()  : mixed
testFindAlternativesOutput()  : mixed
testFindAmbiguousNamespace()  : mixed
testFindCommandEqualNamespace()  : mixed
testFindCommandWithAmbiguousNamespacesButUniqueName()  : mixed
testFindCommandWithMissingNamespace()  : mixed
testFindInvalidNamespace()  : mixed
testFindNamespace()  : mixed
testFindNamespaceDoesNotFailOnDeepSimilarNamespaces()  : mixed
testFindNamespaceWithSubnamespaces()  : mixed
testFindUniqueNameButNamespaceName()  : mixed
testFindWithAmbiguousAbbreviations()  : mixed
testFindWithDoubleColonInNameThrowsException()  : mixed
testGetDefaultHelperSetReturnsDefaultValues()  : mixed
testGetDefaultInputDefinitionReturnsDefaultValues()  : mixed
testGetInvalidCommand()  : mixed
testGetLongVersion()  : mixed
testGetNamespaces()  : mixed
testHasGet()  : mixed
testHelp()  : mixed
testLegacyExceptionListenersAreStillTriggered()  : mixed
testOverwritingDefaultHelperSetOverwritesDefaultValues()  : mixed
testOverwritingDefaultInputDefinitionOverwritesDefaultValues()  : mixed
testRegister()  : mixed
testRenderException()  : mixed
testRenderExceptionEscapesLines()  : mixed
testRenderExceptionWithDoubleWidthCharacters()  : mixed
testRun()  : mixed
testRunAllowsErrorListenersToSilenceTheException()  : mixed
testRunDispatchesAllEventsWithError()  : mixed
testRunDispatchesAllEventsWithException()  : mixed
testRunDispatchesAllEventsWithExceptionInListener()  : mixed
testRunReturnsExitCodeOneForExceptionCodeZero()  : mixed
testRunReturnsIntegerExitCode()  : mixed
testRunWithDispatcher()  : mixed
testRunWithDispatcherAccessingInputOptions()  : mixed
testRunWithDispatcherAddingInputOptions()  : mixed
testRunWithDispatcherSkippingCommand()  : mixed
testRunWithError()  : mixed
testRunWithErrorAndDispatcher()  : mixed
testRunWithErrorFailingStatusCode()  : mixed
testRunWithExceptionAndDispatcher()  : mixed
testSetCatchExceptions()  : mixed
testSetGetName()  : mixed
testSetGetVersion()  : mixed
testSetRunCustomDefaultCommand()  : mixed
testSetRunCustomDefaultCommandWithOption()  : mixed
testSetRunCustomSingleCommand()  : mixed
testSettingCustomInputDefinitionOverwritesDefaultValues()  : mixed
testSilentHelp()  : mixed
testTerminalDimensions()  : mixed
testVerboseValueNotBreakArguments()  : mixed
Issue #9285.
ensureStaticCommandHelp()  : mixed
Replaces the dynamic placeholders of the command help text with a static version.
getDispatcher()  : mixed
normalizeLineBreaks()  : mixed

Properties

Methods

getAddingAlreadySetDefinitionElementData()

public getAddingAlreadySetDefinitionElementData() : mixed

provideAmbiguousAbbreviations()

public provideAmbiguousAbbreviations() : mixed

provideInvalidCommandNamesSingle()

public provideInvalidCommandNamesSingle() : mixed

testAddCommandWithEmptyConstructor()

public testAddCommandWithEmptyConstructor() : mixed
Tags
expectedException

\LogicException

expectedExceptionMessage

Command class "Foo5Command" is not correctly initialized. You probably forgot to call the parent constructor.

testAddingAlreadySetDefinitionElementData()

public testAddingAlreadySetDefinitionElementData(mixed $def) : mixed
Parameters
$def : mixed
Tags
expectedException

\LogicException

dataProvider

getAddingAlreadySetDefinitionElementData

testAddingOptionWithDuplicateShortcut()

public testAddingOptionWithDuplicateShortcut() : mixed
Tags
expectedException

\LogicException

expectedExceptionMessage

An option with shortcut "e" already exists.

testAddingSingleHelperSetOverwritesDefaultValues()

public testAddingSingleHelperSetOverwritesDefaultValues() : mixed

testCanCheckIfTerminalIsInteractive()

public testCanCheckIfTerminalIsInteractive() : mixed
Tags
requires

function posix_isatty

testConsoleErrorEventIsTriggeredOnCommandNotFound()

public testConsoleErrorEventIsTriggeredOnCommandNotFound() : mixed

testErrorIsRethrownIfNotHandledByConsoleErrorEvent()

public testErrorIsRethrownIfNotHandledByConsoleErrorEvent() : mixed
Tags
requires

PHP 7

testErrorIsRethrownIfNotHandledByConsoleErrorEventWithCatchingEnabled()

public testErrorIsRethrownIfNotHandledByConsoleErrorEventWithCatchingEnabled() : mixed
Tags
requires

PHP 7

testFindAlternativeCommands()

public testFindAlternativeCommands() : mixed

testFindAlternativeCommandsWithAnAlias()

public testFindAlternativeCommandsWithAnAlias() : mixed

testFindAlternativeExceptionMessageMultiple()

public testFindAlternativeExceptionMessageMultiple() : mixed

testFindAlternativeExceptionMessageSingle()

public testFindAlternativeExceptionMessageSingle(mixed $name) : mixed
Parameters
$name : mixed
Tags
dataProvider

provideInvalidCommandNamesSingle

expectedException

\Symfony\Component\Console\Exception\CommandNotFoundException

expectedExceptionMessage

Did you mean this

testFindAlternativeNamespace()

public testFindAlternativeNamespace() : mixed

testFindAlternativesOutput()

public testFindAlternativesOutput() : mixed

testFindAmbiguousNamespace()

public testFindAmbiguousNamespace() : mixed

testFindCommandEqualNamespace()

public testFindCommandEqualNamespace() : mixed

testFindCommandWithAmbiguousNamespacesButUniqueName()

public testFindCommandWithAmbiguousNamespacesButUniqueName() : mixed

testFindCommandWithMissingNamespace()

public testFindCommandWithMissingNamespace() : mixed

testFindInvalidNamespace()

public testFindInvalidNamespace() : mixed
Tags
expectedException

\Symfony\Component\Console\Exception\CommandNotFoundException

expectedExceptionMessage

There are no commands defined in the "bar" namespace.

testFindNamespaceDoesNotFailOnDeepSimilarNamespaces()

public testFindNamespaceDoesNotFailOnDeepSimilarNamespaces() : mixed

testFindNamespaceWithSubnamespaces()

public testFindNamespaceWithSubnamespaces() : mixed

testFindUniqueNameButNamespaceName()

public testFindUniqueNameButNamespaceName() : mixed
Tags
expectedException

\Symfony\Component\Console\Exception\CommandNotFoundException

expectedExceptionMessage

Command "foo1" is not defined

testFindWithAmbiguousAbbreviations()

public testFindWithAmbiguousAbbreviations(mixed $abbreviation, mixed $expectedExceptionMessage) : mixed
Parameters
$abbreviation : mixed
$expectedExceptionMessage : mixed
Tags
dataProvider

provideAmbiguousAbbreviations

testFindWithDoubleColonInNameThrowsException()

public testFindWithDoubleColonInNameThrowsException() : mixed
Tags
expectedException

\Symfony\Component\Console\Exception\CommandNotFoundException

expectedExceptionMessage

Command "foo::bar" is not defined.

testGetDefaultHelperSetReturnsDefaultValues()

public testGetDefaultHelperSetReturnsDefaultValues() : mixed

testGetDefaultInputDefinitionReturnsDefaultValues()

public testGetDefaultInputDefinitionReturnsDefaultValues() : mixed

testGetInvalidCommand()

public testGetInvalidCommand() : mixed
Tags
expectedException

\Symfony\Component\Console\Exception\CommandNotFoundException

expectedExceptionMessage

The command "foofoo" does not exist.

testLegacyExceptionListenersAreStillTriggered()

public testLegacyExceptionListenersAreStillTriggered() : mixed
Tags
group

legacy

expectedDeprecation

The "ConsoleEvents::EXCEPTION" event is deprecated since Symfony 3.3 and will be removed in 4.0. Listen to the "ConsoleEvents::ERROR" event instead.

testOverwritingDefaultHelperSetOverwritesDefaultValues()

public testOverwritingDefaultHelperSetOverwritesDefaultValues() : mixed

testOverwritingDefaultInputDefinitionOverwritesDefaultValues()

public testOverwritingDefaultInputDefinitionOverwritesDefaultValues() : mixed

testRenderExceptionEscapesLines()

public testRenderExceptionEscapesLines() : mixed

testRenderExceptionWithDoubleWidthCharacters()

public testRenderExceptionWithDoubleWidthCharacters() : mixed

testRunAllowsErrorListenersToSilenceTheException()

public testRunAllowsErrorListenersToSilenceTheException() : mixed

testRunDispatchesAllEventsWithError()

public testRunDispatchesAllEventsWithError() : mixed

testRunDispatchesAllEventsWithException()

public testRunDispatchesAllEventsWithException() : mixed

testRunDispatchesAllEventsWithExceptionInListener()

public testRunDispatchesAllEventsWithExceptionInListener() : mixed

testRunReturnsExitCodeOneForExceptionCodeZero()

public testRunReturnsExitCodeOneForExceptionCodeZero() : mixed

testRunReturnsIntegerExitCode()

public testRunReturnsIntegerExitCode() : mixed

testRunWithDispatcherAccessingInputOptions()

public testRunWithDispatcherAccessingInputOptions() : mixed

testRunWithDispatcherAddingInputOptions()

public testRunWithDispatcherAddingInputOptions() : mixed

testRunWithDispatcherSkippingCommand()

public testRunWithDispatcherSkippingCommand() : mixed

testRunWithErrorAndDispatcher()

public testRunWithErrorAndDispatcher() : mixed
Tags
expectedException

\LogicException

expectedExceptionMessage

error

testRunWithErrorFailingStatusCode()

public testRunWithErrorFailingStatusCode() : mixed

testRunWithExceptionAndDispatcher()

public testRunWithExceptionAndDispatcher() : mixed
Tags
expectedException

\LogicException

expectedExceptionMessage

error

testSetRunCustomDefaultCommand()

public testSetRunCustomDefaultCommand() : mixed

testSetRunCustomDefaultCommandWithOption()

public testSetRunCustomDefaultCommandWithOption() : mixed

testSetRunCustomSingleCommand()

public testSetRunCustomSingleCommand() : mixed

testSettingCustomInputDefinitionOverwritesDefaultValues()

public testSettingCustomInputDefinitionOverwritesDefaultValues() : mixed

testTerminalDimensions()

public testTerminalDimensions() : mixed
Tags
group

legacy

testVerboseValueNotBreakArguments()

Issue #9285.

public testVerboseValueNotBreakArguments() : mixed

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

ensureStaticCommandHelp()

Replaces the dynamic placeholders of the command help text with a static version.

protected ensureStaticCommandHelp(Application $application) : mixed

The placeholder %command.full_name% includes the script path that is not predictable and can not be tested against.

Parameters
$application : Application

getDispatcher()

protected getDispatcher([mixed $skipCommand = false ]) : mixed
Parameters
$skipCommand : mixed = false

normalizeLineBreaks()

protected normalizeLineBreaks(mixed $text) : mixed
Parameters
$text : mixed

        
On this page

Search results