protected function RangeBrowserTestBase::getTestFieldSettings in Range 8
Returns test range field settings.
Parameters
string $field_type: Range field type. Could be one of the following values: range_integer, range_float or range_decimal.
Return value
array Range field settings.
3 calls to RangeBrowserTestBase::getTestFieldSettings()
- RangeBrowserTestBase::createRangeField in tests/
src/ Functional/ RangeBrowserTestBase.php - Creates a range field of a given type.
- RangeFieldUiTest::getFieldEdit in tests/
src/ Functional/ RangeFieldUiTest.php - Returns field edit array for a given field type.
- RangeFieldUiTest::rangeTestFieldSettings in tests/
src/ Functional/ RangeFieldUiTest.php - Test range field settings.
File
- tests/
src/ Functional/ RangeBrowserTestBase.php, line 102
Class
- RangeBrowserTestBase
- Base class for the range module's tests.
Namespace
Drupal\Tests\range\FunctionalCode
protected function getTestFieldSettings($field_type = 'range_integer') {
switch ($field_type) {
case 'range_integer':
case 'range_float':
case 'range_decimal':
return [
'min' => 5,
'max' => 25,
'field' => [
'prefix' => 'field_prefix',
'suffix' => 'field_suffix',
],
'from' => [
'prefix' => 'from_prefix',
'suffix' => 'from_suffix',
],
'to' => [
'prefix' => 'to_prefix',
'suffix' => 'to_suffix',
],
'combined' => [
'prefix' => 'combined_prefix',
'suffix' => 'combined_suffix',
],
];
}
}