‪TYPO3CMS  9.5
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 31 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 90 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 62 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 43 of file InputDateTimeElementTest.php.

◆ tearDown()

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

Tear down

Definition at line 51 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 35 of file InputDateTimeElementTest.php.