‪TYPO3CMS  ‪main
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 ()
 
 doesTypeLooseComparison (string|int $testValue, string|int $expectedValue)
 
 getConstantsReturnsArrayOfPossibleValuesWithoutDefault ()
 
 getConstantsReturnsArrayOfPossibleValuesWithDefaultIfRequested ()
 
 getConstantsCanBeCalledOnInstances ()
 
 toStringReturnsValueAsString ()
 
 castReturnsObjectOfEnumerationTypeIfSimpleValueIsGiven ()
 
 castReturnsObjectOfCalledEnumerationTypeIfCalledWithValueOfDifferentType ()
 
 castReturnsGivenObjectIfCalledWithValueOfSameType ()
 
 castCastsStringToEnumerationWithCorrespondingValue ()
 
 castCastsIntegerToEnumerationWithCorrespondingValue ()
 
 equalsReturnsTrueIfIntegerIsGivenThatEqualsEnumerationsIntegerValue ()
 
 equalsReturnsTrueIfStringIsGivenThatEqualsEnumerationsIntegerValue ()
 
 equalsReturnsTrueIfEqualEnumerationIsGiven ()
 
 equalsReturnsTrueIfDifferentEnumerationWithSameValueIsGiven ()
 
 equalsReturnsFalseIfDifferentEnumerationWithDifferentValueIsGiven ()
 
 equalsReturnsFalseIfEnumerationOfSameTypeWithDifferentValueIsGiven ()
 
 getNameProvidesNameForAvailableConstant ()
 
 getNameReturnsEmptyStringForNotAvailableConstant ()
 
 getHumanReadableNameProvidesNameForAvailableConstant ()
 
 getHumanReadableNameReturnsEmptyStringForNotAvailableConstant ()
 

Static Public Member Functions

static looseEnumerationValues ()
 

Detailed Description

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

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

◆ castReturnsObjectOfCalledEnumerationTypeIfCalledWithValueOfDifferentType()

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

Definition at line 202 of file EnumerationTest.php.

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

◆ castReturnsObjectOfEnumerationTypeIfSimpleValueIsGiven()

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

Definition at line 193 of file EnumerationTest.php.

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

◆ constructorThrowsExceptionIfInvalidValueIsRequested()

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

Definition at line 45 of file EnumerationTest.php.

◆ constructorThrowsExceptionIfNoConstantsAreDefined()

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

Definition at line 34 of file EnumerationTest.php.

◆ doesTypeLooseComparison()

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

Definition at line 130 of file EnumerationTest.php.

◆ equalsReturnsFalseIfDifferentEnumerationWithDifferentValueIsGiven()

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

Definition at line 280 of file EnumerationTest.php.

◆ equalsReturnsFalseIfEnumerationOfSameTypeWithDifferentValueIsGiven()

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

Definition at line 290 of file EnumerationTest.php.

◆ equalsReturnsTrueIfDifferentEnumerationWithSameValueIsGiven()

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

Definition at line 270 of file EnumerationTest.php.

◆ equalsReturnsTrueIfEqualEnumerationIsGiven()

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

Definition at line 260 of file EnumerationTest.php.

◆ equalsReturnsTrueIfIntegerIsGivenThatEqualsEnumerationsIntegerValue()

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

Definition at line 242 of file EnumerationTest.php.

◆ equalsReturnsTrueIfStringIsGivenThatEqualsEnumerationsIntegerValue()

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

Definition at line 251 of file EnumerationTest.php.

◆ getConstantsCanBeCalledOnInstances()

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

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

◆ loadValuesThrowsExceptionIfGivenValueIsNotAvailableInEnumeration()

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

Definition at line 56 of file EnumerationTest.php.

◆ loadValuesThrowsExceptionIfNoDefaultConstantIsDefinedAndNoValueIsGiven()

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

Definition at line 78 of file EnumerationTest.php.

◆ loadValuesThrowsExceptionIfValueIsDefinedMultipleTimes()

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

Definition at line 89 of file EnumerationTest.php.

◆ looseEnumerationValues()

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

◆ toStringReturnsValueAsString()

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

Definition at line 184 of file EnumerationTest.php.