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

cliAccessWithPackageControllerActionAndArgumentsBuildsCorrectRequest() публичный Метод

Checks if a CLI request specifying some "console style" (--my-argument=value) arguments results in the expected request object
    public function cliAccessWithPackageControllerActionAndArgumentsBuildsCorrectRequest()
    {
        $methodParameters = ['testArgument' => ['optional' => false, 'type' => 'string'], 'testArgument2' => ['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');
        $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->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.');
    }