TYPO3 CMS  TYPO3_7-6
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, $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)
 
 inject ($target, $name, $dependency)
 
 getUniqueId ($prefix='')
 
- Protected Attributes inherited from TYPO3\CMS\Core\Tests\UnitTestCase
 $backupGlobalsBlacklist = ['TYPO3_LOADED_EXT']
 
 $testFilesToDelete = []
 
- Protected Attributes inherited from TYPO3\CMS\Core\Tests\BaseTestCase
 $backupGlobals = true
 
 $backupStaticAttributes = false
 

Detailed Description

Test case

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

◆ castReturnsObjectOfCalledEnumerationTypeIfCalledWithValueOfDifferentType()

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

Definition at line 267 of file EnumerationTest.php.

◆ castReturnsObjectOfEnumerationTypeIfSimpleValueIsGiven()

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

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

◆ equalsReturnsFalseIfDifferentEnumerationWithDifferentValueIsGiven()

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

Definition at line 351 of file EnumerationTest.php.

◆ equalsReturnsFalseIfEnumerationOfSameTypeWithDifferentValueIsGiven()

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

Definition at line 361 of file EnumerationTest.php.

◆ equalsReturnsTrueIfDifferentEnumerationWithSameValueIsGiven()

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

Definition at line 341 of file EnumerationTest.php.

◆ equalsReturnsTrueIfEqualEnumerationIsGiven()

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

Definition at line 331 of file EnumerationTest.php.

◆ equalsReturnsTrueIfIntegerIsGivenThatEqualsEnumerationsIntegerValue()

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

Definition at line 313 of file EnumerationTest.php.

◆ equalsReturnsTrueIfStringIsGivenThatEqualsEnumerationsIntegerValue()

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

Definition at line 322 of file EnumerationTest.php.

◆ getConstantsCanBeCalledOnInstances()

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

Definition at line 240 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 146 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 55 of file EnumerationTest.php.

◆ loadValuesThrowsExceptionIfGivenValueIsNotAvailableInEnumeration()

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

Definition at line 46 of file EnumerationTest.php.

◆ loadValuesThrowsExceptionIfNoDefaultConstantIsDefinedAndNoValueIsGiven()

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

Definition at line 64 of file EnumerationTest.php.

◆ loadValuesThrowsExceptionIfValueIsDefinedMultipleTimes()

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

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