function ImageFieldTest::testProcessFieldValues

Same name in this branch
  1. 8.9.x core/modules/file/tests/src/Unit/Plugin/migrate/field/d6/ImageFieldTest.php \Drupal\Tests\file\Unit\Plugin\migrate\field\d6\ImageFieldTest::testProcessFieldValues()

@covers ::processFieldValues @expectedDeprecation Deprecated in Drupal 8.6.0, to be removed before Drupal 9.0.0. Use defineValueProcessPipeline() instead. See https://www.drupal.org/node/2944598.

File

core/modules/image/tests/src/Unit/Plugin/migrate/field/d7/ImageFieldTest.php, line 50

Class

ImageFieldTest
@coversDefaultClass <a href="/api/drupal/core%21modules%21image%21src%21Plugin%21migrate%21field%21d7%21ImageField.php/class/ImageField/8.9.x" title="Plugin annotation @MigrateField( id = &quot;image&quot;, core = {7}, source_module = &quot;image&quot;, destination_module = &quot;image&quot; )" class="local">\Drupal\image\Plugin\migrate\field\d7\ImageField</a> @group image @group legacy

Namespace

Drupal\Tests\image\Unit\Plugin\migrate\field\d7

Code

public function testProcessFieldValues() {
    $this->plugin
        ->processFieldValues($this->migration, 'somefieldname', []);
    $expected = [
        'plugin' => 'sub_process',
        'source' => 'somefieldname',
        'process' => [
            'target_id' => 'fid',
            'alt' => 'alt',
            'title' => 'title',
            'width' => 'width',
            'height' => 'height',
        ],
    ];
    $this->assertSame($expected, $this->migration
        ->getProcess());
}

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