= Examples =
  • {propertyPath}
    • {error.code}: {error}
  • 1234567890: Validation errors for argument "newBlog"
  • {error.code}: {error}
  • 1234567890: Some error message
Наследование: extends Neos\FluidAdaptor\Core\ViewHelper\AbstractViewHelper
 /**
  * @test
  */
 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');
 }