TYPO3 CMS  TYPO3_6-2
TYPO3\CMS\Core\Tests\Unit\Type\EnumerationTest Class Reference
Inheritance diagram for TYPO3\CMS\Core\Tests\Unit\Type\EnumerationTest:
TYPO3\CMS\Core\Tests\UnitTestCase TYPO3\CMS\Core\Tests\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 ()
 

Additional Inherited Members

- Protected Member Functions inherited from TYPO3\CMS\Core\Tests\UnitTestCase
 tearDown ()
 
- Protected Member Functions inherited from TYPO3\CMS\Core\Tests\BaseTestCase
 getAccessibleMock ( $originalClassName, array $methods=array(), array $arguments=array(), $mockClassName='', $callOriginalConstructor=TRUE, $callOriginalClone=TRUE, $callAutoload=TRUE)
 
 getAccessibleMockForAbstractClass ( $originalClassName, array $arguments=array(), $mockClassName='', $callOriginalConstructor=TRUE, $callOriginalClone=TRUE, $callAutoload=TRUE)
 
 buildAccessibleProxy ($className)
 
 callInaccessibleMethod ($object, $name)
 
 inject ($target, $name, $dependency)
 
 getUniqueId ($prefix='')
 
- Protected Attributes inherited from TYPO3\CMS\Core\Tests\UnitTestCase
 $backupGlobalsBlacklist = array('TYPO3_LOADED_EXT')
 
- Protected Attributes inherited from TYPO3\CMS\Core\Tests\BaseTestCase
 $backupGlobals = TRUE
 
 $backupStaticAttributes = FALSE
 

Detailed Description

Test case

Definition at line 23 of file EnumerationTest.php.

Member Function Documentation

◆ castCastsIntegerToEnumerationWithCorrespondingValue()

TYPO3\CMS\Core\Tests\Unit\Type\EnumerationTest::castCastsIntegerToEnumerationWithCorrespondingValue ( )

◆ castCastsStringToEnumerationWithCorrespondingValue()

TYPO3\CMS\Core\Tests\Unit\Type\EnumerationTest::castCastsStringToEnumerationWithCorrespondingValue ( )

◆ castReturnsGivenObjectIfCalledWithValueOfSameType()

TYPO3\CMS\Core\Tests\Unit\Type\EnumerationTest::castReturnsGivenObjectIfCalledWithValueOfSameType ( )
Test:

Definition at line 260 of file EnumerationTest.php.

◆ castReturnsObjectOfCalledEnumerationTypeIfCalledWithValueOfDifferentType()

TYPO3\CMS\Core\Tests\Unit\Type\EnumerationTest::castReturnsObjectOfCalledEnumerationTypeIfCalledWithValueOfDifferentType ( )
Test:

Definition at line 251 of file EnumerationTest.php.

◆ castReturnsObjectOfEnumerationTypeIfSimpleValueIsGiven()

TYPO3\CMS\Core\Tests\Unit\Type\EnumerationTest::castReturnsObjectOfEnumerationTypeIfSimpleValueIsGiven ( )
Test:

Definition at line 243 of file EnumerationTest.php.

◆ constructorSetsValue()

TYPO3\CMS\Core\Tests\Unit\Type\EnumerationTest::constructorSetsValue ( )

◆ constructorThrowsExceptionIfInvalidValueIsRequested()

TYPO3\CMS\Core\Tests\Unit\Type\EnumerationTest::constructorThrowsExceptionIfInvalidValueIsRequested ( )
Test:

Definition at line 37 of file EnumerationTest.php.

◆ constructorThrowsExceptionIfNoConstantsAreDefined()

TYPO3\CMS\Core\Tests\Unit\Type\EnumerationTest::constructorThrowsExceptionIfNoConstantsAreDefined ( )
Test:

Definition at line 29 of file EnumerationTest.php.

◆ equalsReturnsFalseIfDifferentEnumerationWithDifferentValueIsGiven()

TYPO3\CMS\Core\Tests\Unit\Type\EnumerationTest::equalsReturnsFalseIfDifferentEnumerationWithDifferentValueIsGiven ( )
Test:

Definition at line 327 of file EnumerationTest.php.

◆ equalsReturnsFalseIfEnumerationOfSameTypeWithDifferentValueIsGiven()

TYPO3\CMS\Core\Tests\Unit\Type\EnumerationTest::equalsReturnsFalseIfEnumerationOfSameTypeWithDifferentValueIsGiven ( )
Test:

Definition at line 336 of file EnumerationTest.php.

◆ equalsReturnsTrueIfDifferentEnumerationWithSameValueIsGiven()

TYPO3\CMS\Core\Tests\Unit\Type\EnumerationTest::equalsReturnsTrueIfDifferentEnumerationWithSameValueIsGiven ( )
Test:

Definition at line 318 of file EnumerationTest.php.

◆ equalsReturnsTrueIfEqualEnumerationIsGiven()

TYPO3\CMS\Core\Tests\Unit\Type\EnumerationTest::equalsReturnsTrueIfEqualEnumerationIsGiven ( )
Test:

Definition at line 309 of file EnumerationTest.php.

◆ equalsReturnsTrueIfIntegerIsGivenThatEqualsEnumerationsIntegerValue()

TYPO3\CMS\Core\Tests\Unit\Type\EnumerationTest::equalsReturnsTrueIfIntegerIsGivenThatEqualsEnumerationsIntegerValue ( )
Test:

Definition at line 293 of file EnumerationTest.php.

◆ equalsReturnsTrueIfStringIsGivenThatEqualsEnumerationsIntegerValue()

TYPO3\CMS\Core\Tests\Unit\Type\EnumerationTest::equalsReturnsTrueIfStringIsGivenThatEqualsEnumerationsIntegerValue ( )
Test:

Definition at line 301 of file EnumerationTest.php.

◆ getConstantsCanBeCalledOnInstances()

TYPO3\CMS\Core\Tests\Unit\Type\EnumerationTest::getConstantsCanBeCalledOnInstances ( )
Test:

Definition at line 227 of file EnumerationTest.php.

◆ getConstantsReturnsArrayOfPossibleValuesWithDefaultIfRequested()

TYPO3\CMS\Core\Tests\Unit\Type\EnumerationTest::getConstantsReturnsArrayOfPossibleValuesWithDefaultIfRequested ( )

◆ getConstantsReturnsArrayOfPossibleValuesWithoutDefault()

TYPO3\CMS\Core\Tests\Unit\Type\EnumerationTest::getConstantsReturnsArrayOfPossibleValuesWithoutDefault ( )

◆ isValidComparisonExpectations()

TYPO3\CMS\Core\Tests\Unit\Type\EnumerationTest::isValidComparisonExpectations ( )

Array of value pairs and expected comparison result

Definition at line 137 of file EnumerationTest.php.

◆ isValidDoesTypeLooseComparison()

TYPO3\CMS\Core\Tests\Unit\Type\EnumerationTest::isValidDoesTypeLooseComparison (   $enumerationValue,
  $testValue,
  $expectation 
)

◆ loadValuesSetsStaticEnumConstants()

TYPO3\CMS\Core\Tests\Unit\Type\EnumerationTest::loadValuesSetsStaticEnumConstants ( )

◆ loadValuesThrowsExceptionIfDisallowedTypeIsDefinedAsConstant()

TYPO3\CMS\Core\Tests\Unit\Type\EnumerationTest::loadValuesThrowsExceptionIfDisallowedTypeIsDefinedAsConstant ( )
Test:

Definition at line 53 of file EnumerationTest.php.

◆ loadValuesThrowsExceptionIfGivenValueIsNotAvailableInEnumeration()

TYPO3\CMS\Core\Tests\Unit\Type\EnumerationTest::loadValuesThrowsExceptionIfGivenValueIsNotAvailableInEnumeration ( )
Test:

Definition at line 45 of file EnumerationTest.php.

◆ loadValuesThrowsExceptionIfNoDefaultConstantIsDefinedAndNoValueIsGiven()

TYPO3\CMS\Core\Tests\Unit\Type\EnumerationTest::loadValuesThrowsExceptionIfNoDefaultConstantIsDefinedAndNoValueIsGiven ( )
Test:

Definition at line 61 of file EnumerationTest.php.

◆ loadValuesThrowsExceptionIfValueIsDefinedMultipleTimes()

TYPO3\CMS\Core\Tests\Unit\Type\EnumerationTest::loadValuesThrowsExceptionIfValueIsDefinedMultipleTimes ( )
Test:

Definition at line 69 of file EnumerationTest.php.

◆ setValueSetsValue()

TYPO3\CMS\Core\Tests\Unit\Type\EnumerationTest::setValueSetsValue ( )

◆ setValueToAnInvalidValueThrowsException()

TYPO3\CMS\Core\Tests\Unit\Type\EnumerationTest::setValueToAnInvalidValueThrowsException ( )

◆ toStringReturnsValueAsString()

TYPO3\CMS\Core\Tests\Unit\Type\EnumerationTest::toStringReturnsValueAsString ( )
Test:

Definition at line 235 of file EnumerationTest.php.