‪TYPO3CMS  10.4
TYPO3\CMS\Backend\Tests\Unit\Form\Element\InputDateTimeElementTest Class Reference
Inheritance diagram for TYPO3\CMS\Backend\Tests\Unit\Form\Element\InputDateTimeElementTest:

Public Member Functions

array renderAppliesCorrectTimestampConversionDataProvider ()
 
 renderAppliesCorrectTimestampConversion ($input, $serverTimezone, $expectedOutput)
 

Protected Member Functions

 setUp ()
 
 tearDown ()
 

Protected Attributes

string $timezoneBackup = ''
 

Detailed Description

Test case

Definition at line 32 of file InputDateTimeElementTest.php.

Member Function Documentation

◆ renderAppliesCorrectTimestampConversion()

TYPO3\CMS\Backend\Tests\Unit\Form\Element\InputDateTimeElementTest::renderAppliesCorrectTimestampConversion (   $input,
  $serverTimezone,
  $expectedOutput 
)
Test:
‪@dataProvider renderAppliesCorrectTimestampConversionDataProvider
Parameters
int$input
string$serverTimezone
int$expectedOutput

Definition at line 91 of file InputDateTimeElementTest.php.

References $GLOBALS.

◆ renderAppliesCorrectTimestampConversionDataProvider()

array TYPO3\CMS\Backend\Tests\Unit\Form\Element\InputDateTimeElementTest::renderAppliesCorrectTimestampConversionDataProvider ( )

Data provider for renderAppliesCorrectTimestampConversion

Returns
‪array

Definition at line 63 of file InputDateTimeElementTest.php.

◆ setUp()

TYPO3\CMS\Backend\Tests\Unit\Form\Element\InputDateTimeElementTest::setUp ( )
protected

We're fiddling with hard timestamps in the tests, but time methods in the system under test do use timezone settings. Therefore we backup the current timezone setting, set it to UTC explicitly and reconstitute it again in tearDown()

Definition at line 44 of file InputDateTimeElementTest.php.

◆ tearDown()

TYPO3\CMS\Backend\Tests\Unit\Form\Element\InputDateTimeElementTest::tearDown ( )
protected

Tear down

Definition at line 52 of file InputDateTimeElementTest.php.

Member Data Documentation

◆ $timezoneBackup

string TYPO3\CMS\Backend\Tests\Unit\Form\Element\InputDateTimeElementTest::$timezoneBackup = ''
protected

Selected timezone backup

Definition at line 36 of file InputDateTimeElementTest.php.