You are here

public function TextFieldTest::testGetFieldType in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/text/tests/src/Unit/Migrate/TextFieldTest.php \Drupal\Tests\text\Unit\Migrate\TextFieldTest::testGetFieldType()

@covers ::getFieldType @dataProvider getFieldTypeProvider

File

core/modules/text/tests/src/Unit/Migrate/TextFieldTest.php, line 164
Contains \Drupal\Tests\text\Unit\Migrate\TextFieldTest.

Class

TextFieldTest
@coversDefaultClass \Drupal\text\Plugin\migrate\cckfield\TextField @group text

Namespace

Drupal\Tests\text\Unit\Migrate

Code

public function testGetFieldType($expected_type, $widget_type, array $settings = array()) {
  $row = new Row(array(
    'widget_type' => $widget_type,
  ), array(
    'widget_type' => array(),
  ));
  $row
    ->setSourceProperty('global_settings', $settings);
  $this
    ->assertSame($expected_type, $this->plugin
    ->getFieldType($row));
}