Neos\FluidAdaptor\Tests\Unit\ViewHelpers\Validation\ResultsViewHelperTest::renderAddsValidationResultsForOnePropertyIfForArgumentIsNotEmpty PHP Method

renderAddsValidationResultsForOnePropertyIfForArgumentIsNotEmpty() public method

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