PHP Class Neos\Flow\Tests\Unit\Cli\RequestBuilderTest

Inheritance: extends Neos\Flow\Tests\UnitTestCase
Show file Open project: neos/flow-development-collection

Protected Properties

Property Type Description
$mockCommand Neos\Flow\Cli\Command
$mockCommandManager Neos\Flow\Cli\CommandManager
$mockObjectManager Neos\Flow\ObjectManagement\ObjectManagerInterface
$mockReflectionService Neos\Flow\Reflection\ReflectionService
$requestBuilder Neos\Flow\Cli\RequestBuilder

Public Methods

Method Description
CliAccesWithArgumentsWithAndWithoutValuesBuildsCorrectRequest ( ) Checks if a CLI request specifying some mixed "console style" (-c or --my-argument -f=value) arguments with and without values results in the expected request object
CliAccesWithShortArgumentsBuildsCorrectRequest ( ) Checks if a CLI request specifying some short "console style" (-c value or -c=value or -c = value) arguments results in the expected request object
afterAllRequiredArgumentsUnnamedParametersAreStoredAsExceedingArguments ( )
argumentWithValueSeparatedByEqualSignBuildsCorrectRequest ( )
argumentsAreDetectedAfterOptions ( )
booleanOptionsAreConsideredEvenIfAnUnnamedArgumentFollows ( )
booleanOptionsCanHaveOnlyCertainValuesIfTheValueIsAssignedWithoutEqualSign ( )
checkIfCliAccesWithPackageControllerActionAndArgumentsToleratesSpaces ( ) Checks if a CLI request specifying some "console style" (--my-argument =value) arguments with spaces between name and value results in the expected request object
cliAccessWithPackageControllerActionAndArgumentsBuildsCorrectRequest ( ) Checks if a CLI request specifying some "console style" (--my-argument=value) arguments results in the expected request object
cliAccessWithPackageControllerAndActionNameBuildsCorrectRequest ( ) Checks if a CLI request specifying a package, controller and action name results in the expected request object
exceedingArgumentsMayBeSpecified ( )
ifCommandCantBeResolvedTheHelpScreenIsShown ( )
ifNamedArgumentsAreUsedAllRequiredArgumentsMustBeNamed ( )
ifUnnamedArgumentsAreUsedAllRequiredArgumentsMustBeUnnamed ( )
insteadOfNamedArgumentsTheArgumentsCanBePassedUnnamedInTheCorrectOrder ( )
optionsAreNotMappedToCommandArgumentsIfTheyAreUnnamed ( )
quotedArgumentValuesAreCorrectlyParsedWhenPassingTheCommandAsString ( $quotedArgument, $expectedResult )
quotedValues ( ) : array Data provider
setUp ( ) Sets up this test case

Method Details

CliAccesWithArgumentsWithAndWithoutValuesBuildsCorrectRequest() public method

Checks if a CLI request specifying some mixed "console style" (-c or --my-argument -f=value) arguments with and without values results in the expected request object

CliAccesWithShortArgumentsBuildsCorrectRequest() public method

Checks if a CLI request specifying some short "console style" (-c value or -c=value or -c = value) arguments results in the expected request object

afterAllRequiredArgumentsUnnamedParametersAreStoredAsExceedingArguments() public method

argumentWithValueSeparatedByEqualSignBuildsCorrectRequest() public method

argumentsAreDetectedAfterOptions() public method

booleanOptionsAreConsideredEvenIfAnUnnamedArgumentFollows() public method

booleanOptionsCanHaveOnlyCertainValuesIfTheValueIsAssignedWithoutEqualSign() public method

checkIfCliAccesWithPackageControllerActionAndArgumentsToleratesSpaces() public method

Checks if a CLI request specifying some "console style" (--my-argument =value) arguments with spaces between name and value results in the expected request object

cliAccessWithPackageControllerActionAndArgumentsBuildsCorrectRequest() public method

Checks if a CLI request specifying some "console style" (--my-argument=value) arguments results in the expected request object

cliAccessWithPackageControllerAndActionNameBuildsCorrectRequest() public method

Checks if a CLI request specifying a package, controller and action name results in the expected request object

exceedingArgumentsMayBeSpecified() public method

ifCommandCantBeResolvedTheHelpScreenIsShown() public method

ifNamedArgumentsAreUsedAllRequiredArgumentsMustBeNamed() public method

ifUnnamedArgumentsAreUsedAllRequiredArgumentsMustBeUnnamed() public method

insteadOfNamedArgumentsTheArgumentsCanBePassedUnnamedInTheCorrectOrder() public method

optionsAreNotMappedToCommandArgumentsIfTheyAreUnnamed() public method

quotedArgumentValuesAreCorrectlyParsedWhenPassingTheCommandAsString() public method

public quotedArgumentValuesAreCorrectlyParsedWhenPassingTheCommandAsString ( $quotedArgument, $expectedResult )

quotedValues() public method

Data provider
public quotedValues ( ) : array
return array

setUp() public method

Sets up this test case
public setUp ( )

Property Details

$mockCommand protected property

protected Command,Neos\Flow\Cli $mockCommand
return Neos\Flow\Cli\Command

$mockCommandManager protected property

protected CommandManager,Neos\Flow\Cli $mockCommandManager
return Neos\Flow\Cli\CommandManager

$mockObjectManager protected property

protected ObjectManagerInterface,Neos\Flow\ObjectManagement $mockObjectManager
return Neos\Flow\ObjectManagement\ObjectManagerInterface

$mockReflectionService protected property

protected ReflectionService,Neos\Flow\Reflection $mockReflectionService
return Neos\Flow\Reflection\ReflectionService

$requestBuilder protected property

protected RequestBuilder,Neos\Flow\Cli $requestBuilder
return Neos\Flow\Cli\RequestBuilder