function TextFieldTest::testFilteredTextValueProcessPipeline

Same name and namespace in other branches
  1. 9 core/modules/text/tests/src/Unit/Migrate/d6/TextFieldTest.php \Drupal\Tests\text\Unit\Migrate\d6\TextFieldTest::testFilteredTextValueProcessPipeline()
  2. 10 core/modules/text/tests/src/Unit/Plugin/migrate/field/d6/TextFieldTest.php \Drupal\Tests\text\Unit\Plugin\migrate\field\d6\TextFieldTest::testFilteredTextValueProcessPipeline()
  3. 11.x core/modules/text/tests/src/Unit/Plugin/migrate/field/d6/TextFieldTest.php \Drupal\Tests\text\Unit\Plugin\migrate\field\d6\TextFieldTest::testFilteredTextValueProcessPipeline()

@covers ::defineValueProcessPipeline

File

core/modules/text/tests/src/Unit/Migrate/d6/TextFieldTest.php, line 78

Class

TextFieldTest
@coversDefaultClass <a href="/api/drupal/core%21modules%21text%21src%21Plugin%21migrate%21field%21d6%21TextField.php/class/TextField/8.9.x" title="Plugin annotation @MigrateField( id = &quot;d6_text&quot;, type_map = { &quot;text&quot; = &quot;text&quot;, &quot;text_long&quot; = &quot;text_long&quot;, &quot;text_with_summary&quot; = &quot;text_with_summary&quot; }, core = {6}, source_module = &quot;text&quot;, destination_module = &quot;text&quot;, )" class="local">\Drupal\text\Plugin\migrate\field\d6\TextField</a> @group text @group legacy

Namespace

Drupal\Tests\text\Unit\Migrate\d6

Code

public function testFilteredTextValueProcessPipeline() {
    $field_info = [
        'widget_type' => 'text_textfield',
    ];
    $this->plugin
        ->defineValueProcessPipeline($this->migration, 'body', $field_info);
    $process = $this->migration
        ->getProcess();
    $this->assertSame('sub_process', $process['plugin']);
    $this->assertSame('body', $process['source']);
    $this->assertSame('value', $process['process']['value']);
    // Ensure that filter format IDs will be looked up in the filter format
    // migrations.
    $lookup = $process['process']['format'][2];
    $this->assertSame('migration_lookup', $lookup['plugin']);
    $this->assertContains('d6_filter_format', $lookup['migration']);
    $this->assertContains('d7_filter_format', $lookup['migration']);
    $this->assertSame('format', $lookup['source']);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.