function DateRangeFieldTest::testFromSetting
Same name in other branches
- 11.x core/modules/datetime_range/tests/src/Functional/DateRangeFieldTest.php \Drupal\Tests\datetime_range\Functional\DateRangeFieldTest::testFromSetting()
Tests displaying dates with the 'from_to' setting.
File
-
core/
modules/ datetime_range/ tests/ src/ Functional/ DateRangeFieldTest.php, line 1419
Class
- DateRangeFieldTest
- Tests Daterange field functionality.
Namespace
Drupal\Tests\datetime_range\FunctionalCode
public function testFromSetting() : void {
// Create a test content type.
$this->drupalCreateContentType([
'type' => 'date_content',
]);
foreach (static::fromToSettingDataProvider() as $data) {
$expected = $data['expected'];
$datetime_type = $data['datetime_type'];
$field_formatter_type = $data['field_formatter_type'];
$display_settings = $data[0] ?? [];
$this->doTestFromToSetting($expected, $datetime_type, $field_formatter_type, $display_settings);
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.