function BlockSettingsTest::testTransform
Same name in other branches
- 9 core/modules/block/tests/src/Unit/Plugin/migrate/process/BlockSettingsTest.php \Drupal\Tests\block\Unit\Plugin\migrate\process\BlockSettingsTest::testTransform()
- 10 core/modules/block/tests/src/Unit/Plugin/migrate/process/BlockSettingsTest.php \Drupal\Tests\block\Unit\Plugin\migrate\process\BlockSettingsTest::testTransform()
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 30
Class
- BlockSettingsTest
- @coversDefaultClass \Drupal\block\Plugin\migrate\process\BlockSettings @group block
Namespace
Drupal\Tests\block\Unit\Plugin\migrate\processCode
public function testTransform($value, $expected) : void {
$executable = $this->prophesize(MigrateExecutableInterface::class)
->reveal();
$row = $this->prophesize(Row::class)
->reveal();
$plugin = new BlockSettings([], 'block_settings', []);
$actual = $plugin->transform($value, $executable, $row, 'foo');
$this->assertSame($expected, $actual);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.