public function IntegerFormatterTest::fieldFormatterDataProvider in Range 8
Specific formatter settings data provider.
Return value
array Nested arrays of values to check:
- $settings
- $from
- $to
- $expected_from
- $expected_to
Overrides FormatterTestBase::fieldFormatterDataProvider
File
- tests/
src/ Kernel/ Formatter/ IntegerFormatterTest.php, line 28
Class
- IntegerFormatterTest
- Tests the integer formatter.
Namespace
Drupal\Tests\range\Kernel\FormatterCode
public function fieldFormatterDataProvider() {
return [
// Test separate values.
[
[],
1234,
5678,
'1234',
'5678',
],
[
[
'thousand_separator' => ' ',
],
1234,
5678,
'1 234',
'5 678',
],
// Test combined values.
[
[],
1234,
1234,
'1234',
'1234',
],
[
[
'thousand_separator' => ',',
],
1234,
1234,
'1,234',
'1,234',
],
];
}