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

Public Member Functions

 constructorThrowsExceptionIfNoConstantsAreDefined ()
 
 constructorThrowsExceptionIfInvalidValueIsRequested ()
 
 loadValuesThrowsExceptionIfGivenValueIsNotAvailableInEnumeration ()
 
 loadValuesThrowsExceptionIfDisallowedTypeIsDefinedAsConstant ()
 
 loadValuesThrowsExceptionIfNoDefaultConstantIsDefinedAndNoValueIsGiven ()
 
 loadValuesThrowsExceptionIfValueIsDefinedMultipleTimes ()
 
 loadValuesSetsStaticEnumConstants ()
 
 constructorSetsValue ()
 
 setValueSetsValue ()
 
 setValueToAnInvalidValueThrowsException ()
 
 isValidComparisonExpectations ()
 
 isValidDoesTypeLooseComparison ($enumerationValue, $testValue, $expectation)
 
 getConstantsReturnsArrayOfPossibleValuesWithoutDefault ()
 
 getConstantsReturnsArrayOfPossibleValuesWithDefaultIfRequested ()
 
 getConstantsCanBeCalledOnInstances ()
 
 toStringReturnsValueAsString ()
 
 castReturnsObjectOfEnumerationTypeIfSimpleValueIsGiven ()
 
 castReturnsObjectOfCalledEnumerationTypeIfCalledWithValueOfDifferentType ()
 
 castReturnsGivenObjectIfCalledWithValueOfSameType ()
 
 castCastsStringToEnumerationWithCorrespondingValue ()
 
 castCastsIntegerToEnumerationWithCorrespondingValue ()
 
 equalsReturnsTrueIfIntegerIsGivenThatEqualsEnumerationsIntegerValue ()
 
 equalsReturnsTrueIfStringIsGivenThatEqualsEnumerationsIntegerValue ()
 
 equalsReturnsTrueIfEqualEnumerationIsGiven ()
 
 equalsReturnsTrueIfDifferentEnumerationWithSameValueIsGiven ()
 
 equalsReturnsFalseIfDifferentEnumerationWithDifferentValueIsGiven ()
 
 equalsReturnsFalseIfEnumerationOfSameTypeWithDifferentValueIsGiven ()
 
 getNameProvidesNameForAvailableConstant ()
 
 getNameReturnsEmptyStringForNotAvailableConstant ()
 
 getHumanReadableNameProvidesNameForAvailableConstant ()
 
 getHumanReadableNameReturnsEmptyStringForNotAvailableConstant ()
 

Additional Inherited Members

- 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 inherited from UnitTestCase
 $backupGlobalsBlacklist = ['TYPO3_LOADED_EXT']
 
 $testFilesToDelete = []
 
- Protected Attributes inherited from BaseTestCase
 $backupGlobals = true
 
 $backupStaticAttributes = false
 

Detailed Description

Test case

Definition at line 24 of file EnumerationTest.php.

Member Function Documentation

castCastsIntegerToEnumerationWithCorrespondingValue ( )
Test:

Definition at line 316 of file EnumerationTest.php.

References BaseTestCase\getAccessibleMock().

castCastsStringToEnumerationWithCorrespondingValue ( )
Test:

Definition at line 303 of file EnumerationTest.php.

References BaseTestCase\getAccessibleMock().

castReturnsGivenObjectIfCalledWithValueOfSameType ( )
Test:

Definition at line 293 of file EnumerationTest.php.

castReturnsObjectOfCalledEnumerationTypeIfCalledWithValueOfDifferentType ( )
Test:

Definition at line 283 of file EnumerationTest.php.

castReturnsObjectOfEnumerationTypeIfSimpleValueIsGiven ( )
Test:

Definition at line 274 of file EnumerationTest.php.

constructorSetsValue ( )
Test:

Definition at line 118 of file EnumerationTest.php.

References BaseTestCase\getAccessibleMock().

constructorThrowsExceptionIfInvalidValueIsRequested ( )
Test:

Definition at line 40 of file EnumerationTest.php.

constructorThrowsExceptionIfNoConstantsAreDefined ( )
Test:

Definition at line 29 of file EnumerationTest.php.

equalsReturnsFalseIfDifferentEnumerationWithDifferentValueIsGiven ( )
Test:

Definition at line 367 of file EnumerationTest.php.

equalsReturnsFalseIfEnumerationOfSameTypeWithDifferentValueIsGiven ( )
Test:

Definition at line 377 of file EnumerationTest.php.

equalsReturnsTrueIfDifferentEnumerationWithSameValueIsGiven ( )
Test:

Definition at line 357 of file EnumerationTest.php.

equalsReturnsTrueIfEqualEnumerationIsGiven ( )
Test:

Definition at line 347 of file EnumerationTest.php.

equalsReturnsTrueIfIntegerIsGivenThatEqualsEnumerationsIntegerValue ( )
Test:

Definition at line 329 of file EnumerationTest.php.

equalsReturnsTrueIfStringIsGivenThatEqualsEnumerationsIntegerValue ( )
Test:

Definition at line 338 of file EnumerationTest.php.

getConstantsCanBeCalledOnInstances ( )
Test:

Definition at line 256 of file EnumerationTest.php.

getConstantsReturnsArrayOfPossibleValuesWithDefaultIfRequested ( )
Test:

Definition at line 248 of file EnumerationTest.php.

References Enumeration\getConstants().

getConstantsReturnsArrayOfPossibleValuesWithoutDefault ( )
Test:

Definition at line 240 of file EnumerationTest.php.

References Enumeration\getConstants().

getHumanReadableNameProvidesNameForAvailableConstant ( )
Test:

Definition at line 405 of file EnumerationTest.php.

References CompleteEnumeration\INTEGER_VALUE.

getHumanReadableNameReturnsEmptyStringForNotAvailableConstant ( )
Test:

Definition at line 414 of file EnumerationTest.php.

getNameProvidesNameForAvailableConstant ( )
Test:

Definition at line 387 of file EnumerationTest.php.

References CompleteEnumeration\INTEGER_VALUE.

getNameReturnsEmptyStringForNotAvailableConstant ( )
Test:

Definition at line 396 of file EnumerationTest.php.

isValidComparisonExpectations ( )

Array of value pairs and expected comparison result

Definition at line 162 of file EnumerationTest.php.

isValidDoesTypeLooseComparison (   $enumerationValue,
  $testValue,
  $expectation 
)
Test:
isValidComparisonExpectations

Definition at line 222 of file EnumerationTest.php.

References BaseTestCase\getAccessibleMock(), and BaseTestCase\getUniqueId().

loadValuesSetsStaticEnumConstants ( )
Test:

Definition at line 95 of file EnumerationTest.php.

References BaseTestCase\getAccessibleMock().

loadValuesThrowsExceptionIfDisallowedTypeIsDefinedAsConstant ( )
Test:

Definition at line 62 of file EnumerationTest.php.

loadValuesThrowsExceptionIfGivenValueIsNotAvailableInEnumeration ( )
Test:

Definition at line 51 of file EnumerationTest.php.

loadValuesThrowsExceptionIfNoDefaultConstantIsDefinedAndNoValueIsGiven ( )
Test:

Definition at line 73 of file EnumerationTest.php.

loadValuesThrowsExceptionIfValueIsDefinedMultipleTimes ( )
Test:

Definition at line 84 of file EnumerationTest.php.

setValueSetsValue ( )
Test:

Definition at line 131 of file EnumerationTest.php.

References BaseTestCase\getAccessibleMock().

setValueToAnInvalidValueThrowsException ( )
Test:

Definition at line 145 of file EnumerationTest.php.

References BaseTestCase\getAccessibleMock().

toStringReturnsValueAsString ( )
Test:

Definition at line 265 of file EnumerationTest.php.