Neos\FluidAdaptor\Tests\Unit\ViewHelpers\Validation\ResultsViewHelperTest::renderAddsValidationResultsToTemplateVariableContainerWithCustomVariableNameIfSpecified PHP Метод

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

    public function renderAddsValidationResultsToTemplateVariableContainerWithCustomVariableNameIfSpecified()
    {
        $mockValidationResults = $this->getMockBuilder(\Neos\Error\Messages\Result::class)->getMock();
        $this->request->expects($this->atLeastOnce())->method('getInternalArgument')->with('__submittedArgumentValidationResults')->will($this->returnValue($mockValidationResults));
        $this->templateVariableContainer->expects($this->at(0))->method('add')->with('customName', $mockValidationResults);
        $this->viewHelper->expects($this->once())->method('renderChildren');
        $this->templateVariableContainer->expects($this->at(1))->method('remove')->with('customName');
        $this->viewHelper->render('', 'customName');
    }