public function RangeFieldFormatterSettingsTest::testTransform in Range 8
Test the range field formatter settings transformations.
@covers ::transform @dataProvider transformDataProvider
File
- tests/
src/ Unit/ Plugin/ migrate/ process/ d6/ RangeFieldFormatterSettingsTest.php, line 23
Class
- RangeFieldFormatterSettingsTest
- @coversDefaultClass \Drupal\range\Plugin\migrate\process\d6\RangeFieldFormatterSettings @group range
Namespace
Drupal\Tests\range\Unit\Plugin\migrate\process\d6Code
public function testTransform($display_type, $format, $expected) {
$plugin = new RangeFieldFormatterSettings([], '', [], $this
->createMock(MigrationInterface::class));
$row = $this
->createMock(Row::class);
$row
->expects(self::once())
->method('getDestinationProperty')
->willReturn($display_type);
$actual = $plugin
->transform([
NULL,
$format,
], $this
->createMock(MigrateExecutableInterface::class), $row, NULL);
$this
->assertSame($expected, $actual);
}