function BlockSettingsTest::testTransform
Same name and namespace in other branches
- 9 core/modules/block/tests/src/Unit/Plugin/migrate/process/BlockSettingsTest.php \Drupal\Tests\block\Unit\Plugin\migrate\process\BlockSettingsTest::testTransform()
- 11.x 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 <a href="/api/drupal/core%21modules%21block%21src%21Plugin%21migrate%21process%21BlockSettings.php/class/BlockSettings/10" title="Determines the block settings." class="local">\Drupal\block\Plugin\migrate\process\BlockSettings</a> @group block
Namespace
Drupal\Tests\block\Unit\Plugin\migrate\processCode
public function testTransform($value, $expected) {
$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.