‪TYPO3CMS  11.5
TYPO3\CMS\Core\Tests\Unit\Type\EnumerationTest Class Reference
Inheritance diagram for TYPO3\CMS\Core\Tests\Unit\Type\EnumerationTest:

Public Member Functions

 constructorThrowsExceptionIfNoConstantsAreDefined ()
 
 constructorThrowsExceptionIfInvalidValueIsRequested ()
 
 loadValuesThrowsExceptionIfGivenValueIsNotAvailableInEnumeration ()
 
 loadValuesThrowsExceptionIfDisallowedTypeIsDefinedAsConstant ()
 
 loadValuesThrowsExceptionIfNoDefaultConstantIsDefinedAndNoValueIsGiven ()
 
 loadValuesThrowsExceptionIfValueIsDefinedMultipleTimes ()
 
array looseEnumerationValues ()
 
 doesTypeLooseComparison ($testValue, $expectedValue)
 
 getConstantsReturnsArrayOfPossibleValuesWithoutDefault ()
 
 getConstantsReturnsArrayOfPossibleValuesWithDefaultIfRequested ()
 
 getConstantsCanBeCalledOnInstances ()
 
 toStringReturnsValueAsString ()
 
 castReturnsObjectOfEnumerationTypeIfSimpleValueIsGiven ()
 
 castReturnsObjectOfCalledEnumerationTypeIfCalledWithValueOfDifferentType ()
 
 castReturnsGivenObjectIfCalledWithValueOfSameType ()
 
 castCastsStringToEnumerationWithCorrespondingValue ()
 
 castCastsIntegerToEnumerationWithCorrespondingValue ()
 
 equalsReturnsTrueIfIntegerIsGivenThatEqualsEnumerationsIntegerValue ()
 
 equalsReturnsTrueIfStringIsGivenThatEqualsEnumerationsIntegerValue ()
 
 equalsReturnsTrueIfEqualEnumerationIsGiven ()
 
 equalsReturnsTrueIfDifferentEnumerationWithSameValueIsGiven ()
 
 equalsReturnsFalseIfDifferentEnumerationWithDifferentValueIsGiven ()
 
 equalsReturnsFalseIfEnumerationOfSameTypeWithDifferentValueIsGiven ()
 
 getNameProvidesNameForAvailableConstant ()
 
 getNameReturnsEmptyStringForNotAvailableConstant ()
 
 getHumanReadableNameProvidesNameForAvailableConstant ()
 
 getHumanReadableNameReturnsEmptyStringForNotAvailableConstant ()
 

Detailed Description

Test case

Definition at line 32 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 218 of file EnumerationTest.php.

References TYPO3\CMS\Core\Type\Enumeration\cast().

◆ castReturnsObjectOfCalledEnumerationTypeIfCalledWithValueOfDifferentType()

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

Definition at line 208 of file EnumerationTest.php.

References TYPO3\CMS\Core\Type\Enumeration\cast().

◆ castReturnsObjectOfEnumerationTypeIfSimpleValueIsGiven()

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

Definition at line 199 of file EnumerationTest.php.

References TYPO3\CMS\Core\Type\Enumeration\cast().

◆ constructorThrowsExceptionIfInvalidValueIsRequested()

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

Definition at line 48 of file EnumerationTest.php.

◆ constructorThrowsExceptionIfNoConstantsAreDefined()

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

Definition at line 37 of file EnumerationTest.php.

◆ doesTypeLooseComparison()

TYPO3\CMS\Core\Tests\Unit\Type\EnumerationTest::doesTypeLooseComparison (   $testValue,
  $expectedValue 
)
Test:
‪@dataProvider looseEnumerationValues
Parameters
string | int$testValue
string | int$expectedValue

Definition at line 136 of file EnumerationTest.php.

◆ equalsReturnsFalseIfDifferentEnumerationWithDifferentValueIsGiven()

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

Definition at line 286 of file EnumerationTest.php.

◆ equalsReturnsFalseIfEnumerationOfSameTypeWithDifferentValueIsGiven()

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

Definition at line 296 of file EnumerationTest.php.

◆ equalsReturnsTrueIfDifferentEnumerationWithSameValueIsGiven()

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

Definition at line 276 of file EnumerationTest.php.

◆ equalsReturnsTrueIfEqualEnumerationIsGiven()

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

Definition at line 266 of file EnumerationTest.php.

◆ equalsReturnsTrueIfIntegerIsGivenThatEqualsEnumerationsIntegerValue()

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

Definition at line 248 of file EnumerationTest.php.

◆ equalsReturnsTrueIfStringIsGivenThatEqualsEnumerationsIntegerValue()

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

Definition at line 257 of file EnumerationTest.php.

◆ getConstantsCanBeCalledOnInstances()

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

Definition at line 175 of file EnumerationTest.php.

◆ getConstantsReturnsArrayOfPossibleValuesWithDefaultIfRequested()

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

◆ getConstantsReturnsArrayOfPossibleValuesWithoutDefault()

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

◆ getHumanReadableNameProvidesNameForAvailableConstant()

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

◆ getHumanReadableNameReturnsEmptyStringForNotAvailableConstant()

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

◆ getNameProvidesNameForAvailableConstant()

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

◆ getNameReturnsEmptyStringForNotAvailableConstant()

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

◆ loadValuesThrowsExceptionIfDisallowedTypeIsDefinedAsConstant()

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

Definition at line 70 of file EnumerationTest.php.

◆ loadValuesThrowsExceptionIfGivenValueIsNotAvailableInEnumeration()

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

Definition at line 59 of file EnumerationTest.php.

◆ loadValuesThrowsExceptionIfNoDefaultConstantIsDefinedAndNoValueIsGiven()

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

Definition at line 81 of file EnumerationTest.php.

◆ loadValuesThrowsExceptionIfValueIsDefinedMultipleTimes()

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

Definition at line 92 of file EnumerationTest.php.

◆ looseEnumerationValues()

array TYPO3\CMS\Core\Tests\Unit\Type\EnumerationTest::looseEnumerationValues ( )

◆ toStringReturnsValueAsString()

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

Definition at line 190 of file EnumerationTest.php.