function TextFieldTest::testGetFieldFormatterType
Same name and namespace in other branches
- 10 core/modules/text/tests/src/Unit/Plugin/migrate/field/d7/TextFieldTest.php \Drupal\Tests\text\Unit\Plugin\migrate\field\d7\TextFieldTest::testGetFieldFormatterType()
- 9 core/modules/text/tests/src/Unit/Plugin/migrate/field/d7/TextFieldTest.php \Drupal\Tests\text\Unit\Plugin\migrate\field\d7\TextFieldTest::testGetFieldFormatterType()
- main core/modules/text/tests/src/Unit/Plugin/migrate/field/d7/TextFieldTest.php \Drupal\Tests\text\Unit\Plugin\migrate\field\d7\TextFieldTest::testGetFieldFormatterType()
Tests get field formatter type.
@legacy-covers ::getFieldFormatterType @legacy-covers ::getFieldType
Attributes
#[DataProvider('getFieldFormatterTypeProvider')]
File
-
core/
modules/ text/ tests/ src/ Unit/ Plugin/ migrate/ field/ d7/ TextFieldTest.php, line 54
Class
Namespace
Drupal\Tests\text\Unit\Plugin\migrate\field\d7Code
public function testGetFieldFormatterType($type, $formatter_type, $expected) : void {
$row = new Row();
$row->setSourceProperty('type', $type);
$row->setSourceProperty('formatter/type', $formatter_type);
$row->setSourceProperty('instances', [
[
'data' => serialize([
'settings' => [
'text_processing' => '0',
],
]),
],
]);
$this->assertEquals($expected, $this->plugin
->getFieldFormatterType($row));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.