Neos\Flow\Tests\Unit\Cli\RequestBuilderTest::checkIfCliAccesWithPackageControllerActionAndArgumentsToleratesSpaces PHP Метод

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
    public function checkIfCliAccesWithPackageControllerActionAndArgumentsToleratesSpaces()
    {
        $methodParameters = ['testArgument' => ['optional' => false, 'type' => 'string'], 'testArgument2' => ['optional' => false, 'type' => 'string'], 'testArgument3' => ['optional' => false, 'type' => 'string'], 'testArgument4' => ['optional' => false, 'type' => 'string']];
        $this->mockCommandManager->expects($this->once())->method('getCommandMethodParameters')->with('Acme\\Test\\Command\\DefaultCommandController', 'listCommand')->will($this->returnValue($methodParameters));
        $request = $this->requestBuilder->build('acme.test:default:list --test-argument= value --test-argument2 =value2 --test-argument3 = value3 --test-argument4=value4');
        $this->assertTrue($request->hasArgument('testArgument'), 'The given "testArgument" was not found in the built request.');
        $this->assertTrue($request->hasArgument('testArgument2'), 'The given "testArgument2" was not found in the built request.');
        $this->assertTrue($request->hasArgument('testArgument3'), 'The given "testArgument3" was not found in the built request.');
        $this->assertTrue($request->hasArgument('testArgument4'), 'The given "testArgument4" was not found in the built request.');
        $this->assertSame($request->getArgument('testArgument'), 'value', 'The "testArgument" had not the given value.');
        $this->assertSame($request->getArgument('testArgument2'), 'value2', 'The "testArgument2" had not the given value.');
        $this->assertSame($request->getArgument('testArgument3'), 'value3', 'The "testArgument3" had not the given value.');
        $this->assertSame($request->getArgument('testArgument4'), 'value4', 'The "testArgument4" had not the given value.');
    }