‪TYPO3CMS  ‪main
TYPO3\CMS\Extbase\Tests\Unit\Property\TypeConverter\DateTimeConverterTest Class Reference
Inheritance diagram for TYPO3\CMS\Extbase\Tests\Unit\Property\TypeConverter\DateTimeConverterTest:

Public Member Functions

 convertFromReturnsErrorIfGivenStringCantBeConverted ()
 
 convertFromProperlyConvertsStringWithDefaultDateFormat ()
 
 convertFromUsesDefaultDateFormatIfItIsNotConfigured ()
 
 convertFromEmptyStringReturnsNull ()
 
 convertFromStringTests (string $source, ?string $dateFormat, bool $isValid)
 
 convertFromIntegerOrDigitStringWithoutConfigurationTests (string|int $source)
 
 convertFromIntegerOrDigitStringInArrayWithoutConfigurationTests (string|int $source)
 
 convertFromReturnsErrorIfGivenArrayCantBeConverted ()
 
 convertFromThrowsExceptionIfGivenArrayDoesNotSpecifyTheDate ()
 
 convertFromProperlyConvertsArrayWithDefaultDateFormat ()
 
 convertFromThrowsExceptionIfDatePartKeysHaveInvalidValuesSpecified ($source)
 
 convertFromProperlyConvertsArrayWithDateAsArray ()
 
 convertFromAllowsToOverrideTheTime ()
 
 convertFromAllowsToOverrideTheTimezone ()
 
 convertFromThrowsExceptionIfSpecifiedTimezoneIsInvalid ()
 
 convertFromArrayThrowsExceptionForEmptyArray ()
 
 convertFromArrayReturnsNullForEmptyDate ()
 
 convertFromArrayTests (array $source, $isValid, ?string $expectedResult)
 
 convertFromSupportsDateTimeSubClasses ()
 

Static Public Member Functions

static convertFromStringDataProvider ()
 
static convertFromIntegerOrDigitStringsWithoutConfigurationDataProvider ()
 
static invalidDatePartKeyValuesDataProvider ()
 
static convertFromArrayDataProvider ()
 

Protected Member Functions

 setUp ()
 

Protected Attributes

DateTimeConverter $converter
 

Detailed Description

Definition at line 30 of file DateTimeConverterTest.php.

Member Function Documentation

◆ convertFromAllowsToOverrideTheTime()

TYPO3\CMS\Extbase\Tests\Unit\Property\TypeConverter\DateTimeConverterTest::convertFromAllowsToOverrideTheTime ( )

Definition at line 223 of file DateTimeConverterTest.php.

◆ convertFromAllowsToOverrideTheTimezone()

TYPO3\CMS\Extbase\Tests\Unit\Property\TypeConverter\DateTimeConverterTest::convertFromAllowsToOverrideTheTimezone ( )

Definition at line 240 of file DateTimeConverterTest.php.

◆ convertFromArrayDataProvider()

static TYPO3\CMS\Extbase\Tests\Unit\Property\TypeConverter\DateTimeConverterTest::convertFromArrayDataProvider ( )
static
See also
convertFromArrayTests()

Definition at line 285 of file DateTimeConverterTest.php.

◆ convertFromArrayReturnsNullForEmptyDate()

TYPO3\CMS\Extbase\Tests\Unit\Property\TypeConverter\DateTimeConverterTest::convertFromArrayReturnsNullForEmptyDate ( )

Definition at line 277 of file DateTimeConverterTest.php.

◆ convertFromArrayTests()

TYPO3\CMS\Extbase\Tests\Unit\Property\TypeConverter\DateTimeConverterTest::convertFromArrayTests ( array  $source,
  $isValid,
?string  $expectedResult 
)
Parameters
array$source‪the array to be converted
bool$isValid‪TRUE if the conversion is expected to be successful, otherwise FALSE

Definition at line 308 of file DateTimeConverterTest.php.

References TYPO3\CMS\Extbase\Property\TypeConverter\DateTimeConverter\CONFIGURATION_DATE_FORMAT, and TYPO3\CMS\Extbase\Property\TypeConverter\DateTimeConverter\DEFAULT_DATE_FORMAT.

◆ convertFromArrayThrowsExceptionForEmptyArray()

TYPO3\CMS\Extbase\Tests\Unit\Property\TypeConverter\DateTimeConverterTest::convertFromArrayThrowsExceptionForEmptyArray ( )

Definition at line 269 of file DateTimeConverterTest.php.

◆ convertFromEmptyStringReturnsNull()

TYPO3\CMS\Extbase\Tests\Unit\Property\TypeConverter\DateTimeConverterTest::convertFromEmptyStringReturnsNull ( )

Definition at line 73 of file DateTimeConverterTest.php.

◆ convertFromIntegerOrDigitStringInArrayWithoutConfigurationTests()

TYPO3\CMS\Extbase\Tests\Unit\Property\TypeConverter\DateTimeConverterTest::convertFromIntegerOrDigitStringInArrayWithoutConfigurationTests ( string|int  $source)

Definition at line 151 of file DateTimeConverterTest.php.

◆ convertFromIntegerOrDigitStringsWithoutConfigurationDataProvider()

static TYPO3\CMS\Extbase\Tests\Unit\Property\TypeConverter\DateTimeConverterTest::convertFromIntegerOrDigitStringsWithoutConfigurationDataProvider ( )
static

◆ convertFromIntegerOrDigitStringWithoutConfigurationTests()

TYPO3\CMS\Extbase\Tests\Unit\Property\TypeConverter\DateTimeConverterTest::convertFromIntegerOrDigitStringWithoutConfigurationTests ( string|int  $source)

Definition at line 142 of file DateTimeConverterTest.php.

◆ convertFromProperlyConvertsArrayWithDateAsArray()

TYPO3\CMS\Extbase\Tests\Unit\Property\TypeConverter\DateTimeConverterTest::convertFromProperlyConvertsArrayWithDateAsArray ( )

◆ convertFromProperlyConvertsArrayWithDefaultDateFormat()

TYPO3\CMS\Extbase\Tests\Unit\Property\TypeConverter\DateTimeConverterTest::convertFromProperlyConvertsArrayWithDefaultDateFormat ( )

Definition at line 174 of file DateTimeConverterTest.php.

◆ convertFromProperlyConvertsStringWithDefaultDateFormat()

TYPO3\CMS\Extbase\Tests\Unit\Property\TypeConverter\DateTimeConverterTest::convertFromProperlyConvertsStringWithDefaultDateFormat ( )

Definition at line 48 of file DateTimeConverterTest.php.

◆ convertFromReturnsErrorIfGivenArrayCantBeConverted()

TYPO3\CMS\Extbase\Tests\Unit\Property\TypeConverter\DateTimeConverterTest::convertFromReturnsErrorIfGivenArrayCantBeConverted ( )

Definition at line 159 of file DateTimeConverterTest.php.

◆ convertFromReturnsErrorIfGivenStringCantBeConverted()

TYPO3\CMS\Extbase\Tests\Unit\Property\TypeConverter\DateTimeConverterTest::convertFromReturnsErrorIfGivenStringCantBeConverted ( )

Definition at line 41 of file DateTimeConverterTest.php.

◆ convertFromStringDataProvider()

static TYPO3\CMS\Extbase\Tests\Unit\Property\TypeConverter\DateTimeConverterTest::convertFromStringDataProvider ( )
static
See also
convertFromStringTests()

Definition at line 82 of file DateTimeConverterTest.php.

◆ convertFromStringTests()

TYPO3\CMS\Extbase\Tests\Unit\Property\TypeConverter\DateTimeConverterTest::convertFromStringTests ( string  $source,
?string  $dateFormat,
bool  $isValid 
)
Parameters
string$source‪the string to be converted
string | null$dateFormat‪the expected date format
bool$isValid‪TRUE if the conversion is expected to be successful, otherwise FALSE

Definition at line 103 of file DateTimeConverterTest.php.

References TYPO3\CMS\Extbase\Property\TypeConverter\DateTimeConverter\CONFIGURATION_DATE_FORMAT, and TYPO3\CMS\Extbase\Property\TypeConverter\DateTimeConverter\DEFAULT_DATE_FORMAT.

◆ convertFromSupportsDateTimeSubClasses()

TYPO3\CMS\Extbase\Tests\Unit\Property\TypeConverter\DateTimeConverterTest::convertFromSupportsDateTimeSubClasses ( )

Definition at line 340 of file DateTimeConverterTest.php.

◆ convertFromThrowsExceptionIfDatePartKeysHaveInvalidValuesSpecified()

TYPO3\CMS\Extbase\Tests\Unit\Property\TypeConverter\DateTimeConverterTest::convertFromThrowsExceptionIfDatePartKeysHaveInvalidValuesSpecified (   $source)

Definition at line 199 of file DateTimeConverterTest.php.

◆ convertFromThrowsExceptionIfGivenArrayDoesNotSpecifyTheDate()

TYPO3\CMS\Extbase\Tests\Unit\Property\TypeConverter\DateTimeConverterTest::convertFromThrowsExceptionIfGivenArrayDoesNotSpecifyTheDate ( )

Definition at line 166 of file DateTimeConverterTest.php.

◆ convertFromThrowsExceptionIfSpecifiedTimezoneIsInvalid()

TYPO3\CMS\Extbase\Tests\Unit\Property\TypeConverter\DateTimeConverterTest::convertFromThrowsExceptionIfSpecifiedTimezoneIsInvalid ( )

Definition at line 256 of file DateTimeConverterTest.php.

◆ convertFromUsesDefaultDateFormatIfItIsNotConfigured()

TYPO3\CMS\Extbase\Tests\Unit\Property\TypeConverter\DateTimeConverterTest::convertFromUsesDefaultDateFormatIfItIsNotConfigured ( )

◆ invalidDatePartKeyValuesDataProvider()

static TYPO3\CMS\Extbase\Tests\Unit\Property\TypeConverter\DateTimeConverterTest::invalidDatePartKeyValuesDataProvider ( )
static

◆ setUp()

TYPO3\CMS\Extbase\Tests\Unit\Property\TypeConverter\DateTimeConverterTest::setUp ( )
protected

Definition at line 34 of file DateTimeConverterTest.php.

Member Data Documentation

◆ $converter

DateTimeConverter TYPO3\CMS\Extbase\Tests\Unit\Property\TypeConverter\DateTimeConverterTest::$converter
protected

Definition at line 32 of file DateTimeConverterTest.php.