You are here

public function BlockSettingsTest::testTransform in Drupal 9

Tests the blocks settings process plugin.

@covers ::transform

@dataProvider providerTestTransform

Parameters

array $value: The source value for the plugin.

array $expected: The expected result.

File

core/modules/block/tests/src/Unit/Plugin/migrate/process/BlockSettingsTest.php, line 28

Class

BlockSettingsTest
@coversDefaultClass \Drupal\block\Plugin\migrate\process\BlockSettings @group block

Namespace

Drupal\Tests\block\Unit\Plugin\migrate\process

Code

public function testTransform($value, $expected) {
  $executable = $this
    ->prophesize(MigrateExecutableInterface::class)
    ->reveal();
  if (empty($row)) {
    $row = $this
      ->prophesize(Row::class)
      ->reveal();
  }
  $plugin = new BlockSettings([], 'block_settings', [], 'foo');
  $actual = $plugin
    ->transform($value, $executable, $row, 'foo');
  $this
    ->assertSame($expected, $actual);
}