public function testGetClass($field_type,
$base_field_class,
$expected_override_class) { $base_field = BaseFieldDefinition::
create($field_type) ->
setName('Test Field'
) ->
setTargetEntityTypeId('entity_test'
);
if ($base_field_class) { $base_field->
setClass($base_field_class);
} $override = BaseFieldOverride::
createFromBaseFieldDefinition($base_field, 'test_bundle'
);
$this->
assertEquals($expected_override_class,
ltrim($override->
getClass(), '\\'
));
} /**
* Test cases for ::testGetClass.
*/
public function getClassTestCases() { return [ 'String (default class)' =>
[ 'string',
FALSE,