You are here

public function ImageFieldTest::testProcessFieldValues in Drupal 8

Same name in this branch
  1. 8 core/modules/image/tests/src/Unit/Plugin/migrate/field/d7/ImageFieldTest.php \Drupal\Tests\image\Unit\Plugin\migrate\field\d7\ImageFieldTest::testProcessFieldValues()
  2. 8 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 \Drupal\image\Plugin\migrate\field\d7\ImageField @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());
}