TYPO3CMS  8
 All Classes Namespaces Files Functions Variables Pages
ValidatorResolverTest Class Reference
Inheritance diagram for ValidatorResolverTest:
UnitTestCase BaseTestCase

Public Member Functions

 resolveValidatorObjectNameWithShortHandNotationReturnsValidatorNameIfClassExists ()
 
 resolveValidatorObjectNameWithShortHandNotationThrowsExceptionIfClassNotExists ()
 
 resolveValidatorObjectNameWithShortHandNotationReturnsValidatorNameIfClassExistsButDoesNotImplementValidatorInterface ()
 
 resolveValidatorObjectNameReturnsValidatorNameIfClassExists ()
 
 resolveValidatorObjectNameThrowsNoSuchValidatorExceptionIfClassNotExists ()
 
 resolveValidatorObjectNameThrowsNoSuchValidatorExceptionIfClassExistsButDoesNotImplementValidatorInterface ()
 
 namespacedShorthandValidatornames ()
 
 resolveValidatorObjectNameCanResolveNamespacedShorthandValidatornames ($namespace, $className, $shorthandValidatorname)
 
 resolveValidatorObjectNameCanResolveShortNamesOfBuiltInValidators ()
 
 createValidatorThrowsNoSuchValidatorExceptionIfAValidatorCouldNotBeResolved ()
 
 getBaseValidatorCachesTheResultOfTheBuildBaseValidatorChainCalls ()
 
 buildMethodArgumentsValidatorConjunctionsReturnsEmptyArrayIfMethodHasNoArguments ()
 
 buildMethodArgumentsValidatorConjunctionsBuildsAConjunctionFromValidateAnnotationsOfTheSpecifiedMethod ()
 
 buildMethodArgumentsValidatorConjunctionsThrowsExceptionIfValidationAnnotationForNonExistingArgumentExists ()
 
 buildBaseValidatorConjunctionAddsValidatorsDefinedByAnnotationsInTheClassToTheReturnedConjunction ()
 
 modelNamesProvider ()
 
 buildBaseValidatorConjunctionCreatesValidatorFromClassName ($modelClassName, $validatorClassName)
 
 resolveValidatorObjectNameCallsGetValidatorType ()
 
 getValidatorTypeCorrectlyRenamesPhpDataTypes ()
 
 getValidatorTypeRenamesMixedToRaw ()
 
 validatorAnnotations ()
 
 parseValidatorAnnotationCanParseAnnotations ($annotation, $expectedResult)
 

Protected Member Functions

 setUp ()
 
- Protected Member Functions inherited from UnitTestCase
 tearDown ()
 
- Protected Member Functions inherited from BaseTestCase
 getAccessibleMock ($originalClassName, $methods=[], array $arguments=[], $mockClassName= '', $callOriginalConstructor=true, $callOriginalClone=true, $callAutoload=true)
 
 getAccessibleMockForAbstractClass ($originalClassName, array $arguments=[], $mockClassName= '', $callOriginalConstructor=true, $callOriginalClone=true, $callAutoload=true, $mockedMethods=[])
 
 buildAccessibleProxy ($className)
 
 callInaccessibleMethod ($object, $name,...$arguments)
 
 inject ($target, $name, $dependency)
 
 getUniqueId ($prefix= '')
 

Protected Attributes

 $validatorResolver
 
 $mockObjectManager
 
- Protected Attributes inherited from UnitTestCase
 $backupGlobalsBlacklist = ['TYPO3_LOADED_EXT']
 
 $testFilesToDelete = []
 
- Protected Attributes inherited from BaseTestCase
 $backupGlobals = true
 
 $backupStaticAttributes = false
 

Detailed Description

Test case

Definition at line 23 of file ValidatorResolverTest.php.

Member Function Documentation

buildBaseValidatorConjunctionAddsValidatorsDefinedByAnnotationsInTheClassToTheReturnedConjunction ( )
buildBaseValidatorConjunctionCreatesValidatorFromClassName (   $modelClassName,
  $validatorClassName 
)
Parameters
string$modelClassName
string$validatorClassName
Test:
modelNamesProvider

Definition at line 393 of file ValidatorResolverTest.php.

References ValidatorResolverTest\$mockObjectManager, ValidatorResolverTest\$validatorResolver, and BaseTestCase\getAccessibleMock().

buildMethodArgumentsValidatorConjunctionsBuildsAConjunctionFromValidateAnnotationsOfTheSpecifiedMethod ( )
buildMethodArgumentsValidatorConjunctionsReturnsEmptyArrayIfMethodHasNoArguments ( )
buildMethodArgumentsValidatorConjunctionsThrowsExceptionIfValidationAnnotationForNonExistingArgumentExists ( )
createValidatorThrowsNoSuchValidatorExceptionIfAValidatorCouldNotBeResolved ( )
Test:

Definition at line 190 of file ValidatorResolverTest.php.

References BaseTestCase\getUniqueId().

getBaseValidatorCachesTheResultOfTheBuildBaseValidatorChainCalls ( )
getValidatorTypeCorrectlyRenamesPhpDataTypes ( )
Test:

Definition at line 420 of file ValidatorResolverTest.php.

getValidatorTypeRenamesMixedToRaw ( )
Test:

Definition at line 438 of file ValidatorResolverTest.php.

modelNamesProvider ( )

dataProvider for buildBaseValidatorConjunctionAddsValidatorFromConventionToTheReturnedConjunction

Returns
array

Definition at line 377 of file ValidatorResolverTest.php.

namespacedShorthandValidatornames ( )
Returns
array

Definition at line 133 of file ValidatorResolverTest.php.

parseValidatorAnnotationCanParseAnnotations (   $annotation,
  $expectedResult 
)
Test:
validatorAnnotations
Parameters
mixed$annotation
mixed$expectedResult

Definition at line 590 of file ValidatorResolverTest.php.

resolveValidatorObjectNameCallsGetValidatorType ( )
resolveValidatorObjectNameCanResolveNamespacedShorthandValidatornames (   $namespace,
  $className,
  $shorthandValidatorname 
)
Parameters
string$namespace
string$className
string$shorthandValidatorname
Test:
namespacedShorthandValidatornames

Definition at line 149 of file ValidatorResolverTest.php.

resolveValidatorObjectNameCanResolveShortNamesOfBuiltInValidators ( )
Test:

Definition at line 160 of file ValidatorResolverTest.php.

resolveValidatorObjectNameReturnsValidatorNameIfClassExists ( )
Test:

Definition at line 91 of file ValidatorResolverTest.php.

References BaseTestCase\getUniqueId().

resolveValidatorObjectNameThrowsNoSuchValidatorExceptionIfClassExistsButDoesNotImplementValidatorInterface ( )
Test:

Definition at line 118 of file ValidatorResolverTest.php.

References BaseTestCase\getUniqueId().

resolveValidatorObjectNameThrowsNoSuchValidatorExceptionIfClassNotExists ( )
Test:

Definition at line 107 of file ValidatorResolverTest.php.

References BaseTestCase\getUniqueId().

resolveValidatorObjectNameWithShortHandNotationReturnsValidatorNameIfClassExists ( )
Test:

Definition at line 47 of file ValidatorResolverTest.php.

References BaseTestCase\getUniqueId().

resolveValidatorObjectNameWithShortHandNotationReturnsValidatorNameIfClassExistsButDoesNotImplementValidatorInterface ( )
Test:

Definition at line 74 of file ValidatorResolverTest.php.

References BaseTestCase\getUniqueId().

resolveValidatorObjectNameWithShortHandNotationThrowsExceptionIfClassNotExists ( )
Test:

Definition at line 62 of file ValidatorResolverTest.php.

References BaseTestCase\getUniqueId().

setUp ( )
protected

Definition at line 35 of file ValidatorResolverTest.php.

References BaseTestCase\getAccessibleMock().

validatorAnnotations ( )

dataProvider for parseValidatorAnnotationCanParseAnnotations

Returns
array

Definition at line 447 of file ValidatorResolverTest.php.

Member Data Documentation