public function buildMethodArgumentsValidatorConjunctionsThrowsExceptionIfValidationAnnotationForNonExistingArgumentExists()
{
$mockObject = new \stdClass();
$methodParameters = ['arg1' => ['type' => 'string']];
$validateAnnotations = [new Annotations\Validate(['type' => 'TYPO3\\TestPackage\\Quux', 'argumentName' => '$arg2'])];
$mockReflectionService = $this->getMockBuilder(ReflectionService::class)->disableOriginalConstructor()->getMock();
$mockReflectionService->expects($this->once())->method('getMethodAnnotations')->with(get_class($mockObject), 'fooAction', Annotations\Validate::class)->will($this->returnValue($validateAnnotations));
$mockReflectionService->expects($this->once())->method('getMethodParameters')->with(get_class($mockObject), 'fooAction')->will($this->returnValue($methodParameters));
$mockStringValidator = $this->createMock(ValidatorInterface::class);
$mockQuuxValidator = $this->createMock(ValidatorInterface::class);
$conjunction1 = $this->getMockBuilder(ConjunctionValidator::class)->disableOriginalConstructor()->getMock();
$conjunction1->expects($this->at(0))->method('addValidator')->with($mockStringValidator);
$validatorResolver = $this->getAccessibleMock(ValidatorResolver::class, ['createValidator'], [], '', false);
$validatorResolver->expects($this->at(0))->method('createValidator')->with(ConjunctionValidator::class)->will($this->returnValue($conjunction1));
$validatorResolver->expects($this->at(1))->method('createValidator')->with('string')->will($this->returnValue($mockStringValidator));
$validatorResolver->expects($this->at(2))->method('createValidator')->with('TYPO3\\TestPackage\\Quux')->will($this->returnValue($mockQuuxValidator));
$validatorResolver->_set('reflectionService', $mockReflectionService);
$validatorResolver->buildMethodArgumentsValidatorConjunctions(get_class($mockObject), 'fooAction');
}