Neos\Flow\Mvc\Controller\Argument::getValidator PHP Method

getValidator() public method

Returns the set validator
public getValidator ( ) : Neos\Flow\Validation\Validator\ValidatorInterface
return Neos\Flow\Validation\Validator\ValidatorInterface The set validator, NULL if none was set
    public function getValidator()
    {
        return $this->validator;
    }

Usage Example

コード例 #1
0
ファイル: ArgumentTest.php プロジェクト: neos/flow
 /**
  * @test
  */
 public function setValidatorShouldProvideFluentInterfaceAndReallySetValidator()
 {
     $mockValidator = $this->createMock(ValidatorInterface::class);
     $returnedArgument = $this->simpleValueArgument->setValidator($mockValidator);
     $this->assertSame($this->simpleValueArgument, $returnedArgument, 'The returned argument is not the original argument.');
     $this->assertSame($mockValidator, $this->simpleValueArgument->getValidator());
 }