Unverified Commit 96a0e620 authored by alexpott's avatar alexpott

Issue #3160031 by quietone, alexpott, jungle, longwave, jameszhang023: Fix 18...

Issue #3160031 by quietone, alexpott, jungle, longwave, jameszhang023: Fix 18 spelling errors for migrate specific terms
parent 23da7683
...@@ -37,7 +37,7 @@ protected function setUp() { ...@@ -37,7 +37,7 @@ protected function setUp() {
* @covers ::transform * @covers ::transform
*/ */
public function testTransformNoData() { public function testTransformNoData() {
$transformed_value = $this->plugin->transform([0, '', []], $this->migrateExecutable, $this->row, 'destinationproperty'); $transformed_value = $this->plugin->transform([0, '', []], $this->migrateExecutable, $this->row, 'destination_property');
$this->assertEmpty($transformed_value); $this->assertEmpty($transformed_value);
} }
...@@ -45,7 +45,7 @@ public function testTransformNoData() { ...@@ -45,7 +45,7 @@ public function testTransformNoData() {
* @covers ::transform * @covers ::transform
*/ */
public function testTransformSinglePageWithFront() { public function testTransformSinglePageWithFront() {
$visibility = $this->plugin->transform([0, '<front>', []], $this->migrateExecutable, $this->row, 'destinationproperty'); $visibility = $this->plugin->transform([0, '<front>', []], $this->migrateExecutable, $this->row, 'destination_property');
$this->assertSame('request_path', $visibility['request_path']['id']); $this->assertSame('request_path', $visibility['request_path']['id']);
$this->assertTrue($visibility['request_path']['negate']); $this->assertTrue($visibility['request_path']['negate']);
$this->assertSame('<front>', $visibility['request_path']['pages']); $this->assertSame('<front>', $visibility['request_path']['pages']);
...@@ -55,7 +55,7 @@ public function testTransformSinglePageWithFront() { ...@@ -55,7 +55,7 @@ public function testTransformSinglePageWithFront() {
* @covers ::transform * @covers ::transform
*/ */
public function testTransformMultiplePagesWithFront() { public function testTransformMultiplePagesWithFront() {
$visibility = $this->plugin->transform([1, "foo\n/bar\rbaz\r\n<front>", []], $this->migrateExecutable, $this->row, 'destinationproperty'); $visibility = $this->plugin->transform([1, "foo\n/bar\rbaz\r\n<front>", []], $this->migrateExecutable, $this->row, 'destination_property');
$this->assertSame('request_path', $visibility['request_path']['id']); $this->assertSame('request_path', $visibility['request_path']['id']);
$this->assertFalse($visibility['request_path']['negate']); $this->assertFalse($visibility['request_path']['negate']);
$this->assertSame("/foo\n/bar\n/baz\n<front>", $visibility['request_path']['pages']); $this->assertSame("/foo\n/bar\n/baz\n<front>", $visibility['request_path']['pages']);
...@@ -66,7 +66,7 @@ public function testTransformMultiplePagesWithFront() { ...@@ -66,7 +66,7 @@ public function testTransformMultiplePagesWithFront() {
*/ */
public function testTransformPhpEnabled() { public function testTransformPhpEnabled() {
$this->moduleHandler->moduleExists('php')->willReturn(TRUE); $this->moduleHandler->moduleExists('php')->willReturn(TRUE);
$visibility = $this->plugin->transform([2, '<?php', []], $this->migrateExecutable, $this->row, 'destinationproperty'); $visibility = $this->plugin->transform([2, '<?php', []], $this->migrateExecutable, $this->row, 'destination_property');
$this->assertSame('php', $visibility['php']['id']); $this->assertSame('php', $visibility['php']['id']);
$this->assertFalse($visibility['php']['negate']); $this->assertFalse($visibility['php']['negate']);
$this->assertSame('<?php', $visibility['php']['php']); $this->assertSame('<?php', $visibility['php']['php']);
...@@ -77,7 +77,7 @@ public function testTransformPhpEnabled() { ...@@ -77,7 +77,7 @@ public function testTransformPhpEnabled() {
*/ */
public function testTransformPhpDisabled() { public function testTransformPhpDisabled() {
$this->moduleHandler->moduleExists('php')->willReturn(FALSE); $this->moduleHandler->moduleExists('php')->willReturn(FALSE);
$transformed_value = $this->plugin->transform([2, '<?php', []], $this->migrateExecutable, $this->row, 'destinationproperty'); $transformed_value = $this->plugin->transform([2, '<?php', []], $this->migrateExecutable, $this->row, 'destination_property');
$this->assertEmpty($transformed_value); $this->assertEmpty($transformed_value);
} }
...@@ -97,7 +97,7 @@ public function testTransformException() { ...@@ -97,7 +97,7 @@ public function testTransformException() {
$this->plugin = new BlockVisibility(['skip_php' => TRUE], 'block_visibility_pages', [], $this->moduleHandler->reveal(), $migrate_lookup->reveal()); $this->plugin = new BlockVisibility(['skip_php' => TRUE], 'block_visibility_pages', [], $this->moduleHandler->reveal(), $migrate_lookup->reveal());
$this->expectException(MigrateSkipRowException::class); $this->expectException(MigrateSkipRowException::class);
$this->expectExceptionMessage("The block with bid '99' from module 'foobar' will have no PHP or request_path visibility configuration."); $this->expectExceptionMessage("The block with bid '99' from module 'foobar' will have no PHP or request_path visibility configuration.");
$this->plugin->transform([2, '<?php', []], $this->migrateExecutable, $this->row, 'destinationproperty'); $this->plugin->transform([2, '<?php', []], $this->migrateExecutable, $this->row, 'destination_property');
} }
} }
...@@ -31,7 +31,7 @@ public function testTransformAltTitle() { ...@@ -31,7 +31,7 @@ public function testTransformAltTitle() {
$options = [ $options = [
'alt' => 'Foobaz', 'alt' => 'Foobaz',
'title' => 'Wambooli', 'title' => 'Bar',
]; ];
$value = [ $value = [
'fid' => 1, 'fid' => 1,
...@@ -45,7 +45,7 @@ public function testTransformAltTitle() { ...@@ -45,7 +45,7 @@ public function testTransformAltTitle() {
'display' => TRUE, 'display' => TRUE,
'description' => '', 'description' => '',
'alt' => 'Foobaz', 'alt' => 'Foobaz',
'title' => 'Wambooli', 'title' => 'Bar',
]; ];
$this->assertSame($expected, $transformed); $this->assertSame($expected, $transformed);
} }
......
...@@ -55,7 +55,7 @@ public function testTransform() { ...@@ -55,7 +55,7 @@ public function testTransform() {
'es' => 'es.example.com', 'es' => 'es.example.com',
'hu' => 'hu.example.com', 'hu' => 'hu.example.com',
]; ];
$value = $this->plugin->transform($source, $this->migrateExecutable, $this->row, 'destinationproperty'); $value = $this->plugin->transform($source, $this->migrateExecutable, $this->row, 'destination_property');
$this->assertSame($value, $expected); $this->assertSame($value, $expected);
} }
......
...@@ -50,7 +50,7 @@ public function testTransformWithWeights() { ...@@ -50,7 +50,7 @@ public function testTransformWithWeights() {
'language-selected' => -6, 'language-selected' => -6,
], ],
]; ];
$value = $this->plugin->transform($source, $this->migrateExecutable, $this->row, 'destinationproperty'); $value = $this->plugin->transform($source, $this->migrateExecutable, $this->row, 'destination_property');
$this->assertSame($value, $expected); $this->assertSame($value, $expected);
} }
...@@ -70,7 +70,7 @@ public function testTransformWithoutWeights() { ...@@ -70,7 +70,7 @@ public function testTransformWithoutWeights() {
'language-url-fallback' => 1, 'language-url-fallback' => 1,
], ],
]; ];
$value = $this->plugin->transform($source, $this->migrateExecutable, $this->row, 'destinationproperty'); $value = $this->plugin->transform($source, $this->migrateExecutable, $this->row, 'destination_property');
$this->assertSame($value, $expected); $this->assertSame($value, $expected);
} }
...@@ -81,7 +81,7 @@ public function testStringInput() { ...@@ -81,7 +81,7 @@ public function testStringInput() {
$this->plugin = new LanguageNegotiation([], 'map', []); $this->plugin = new LanguageNegotiation([], 'map', []);
$this->expectException(MigrateException::class); $this->expectException(MigrateException::class);
$this->expectExceptionMessage('The input should be an array'); $this->expectExceptionMessage('The input should be an array');
$this->plugin->transform('foo', $this->migrateExecutable, $this->row, 'destinationproperty'); $this->plugin->transform('foo', $this->migrateExecutable, $this->row, 'destination_property');
} }
} }
...@@ -27,7 +27,7 @@ public function testTransformAll() { ...@@ -27,7 +27,7 @@ public function testTransformAll() {
1 => 'language_content', 1 => 'language_content',
2 => 'language_interface', 2 => 'language_interface',
]; ];
$value = $this->plugin->transform($source, $this->migrateExecutable, $this->row, 'destinationproperty'); $value = $this->plugin->transform($source, $this->migrateExecutable, $this->row, 'destination_property');
$this->assertSame($value, $expected); $this->assertSame($value, $expected);
} }
...@@ -44,7 +44,7 @@ public function testTransformConfigurable() { ...@@ -44,7 +44,7 @@ public function testTransformConfigurable() {
$expected = [ $expected = [
0 => 'language_interface', 0 => 'language_interface',
]; ];
$value = $this->plugin->transform($source, $this->migrateExecutable, $this->row, 'destinationproperty'); $value = $this->plugin->transform($source, $this->migrateExecutable, $this->row, 'destination_property');
$this->assertSame($value, $expected); $this->assertSame($value, $expected);
} }
...@@ -55,7 +55,7 @@ public function testStringInput() { ...@@ -55,7 +55,7 @@ public function testStringInput() {
$this->plugin = new LanguageTypes([], 'map', []); $this->plugin = new LanguageTypes([], 'map', []);
$this->expectException(MigrateException::class); $this->expectException(MigrateException::class);
$this->expectExceptionMessage('The input should be an array'); $this->expectExceptionMessage('The input should be an array');
$this->plugin->transform('foo', $this->migrateExecutable, $this->row, 'destinationproperty'); $this->plugin->transform('foo', $this->migrateExecutable, $this->row, 'destination_property');
} }
} }
...@@ -199,7 +199,7 @@ public function doTransform($value, $configuration = []) { ...@@ -199,7 +199,7 @@ public function doTransform($value, $configuration = []) {
$executable = $this->prophesize(MigrateExecutableInterface::class)->reveal(); $executable = $this->prophesize(MigrateExecutableInterface::class)->reveal();
$plugin = new LinkUri($configuration, 'link_uri', [], $entityTypeManager, $routeBuilder); $plugin = new LinkUri($configuration, 'link_uri', [], $entityTypeManager, $routeBuilder);
$actual = $plugin->transform($value, $executable, $row, 'destinationproperty'); $actual = $plugin->transform($value, $executable, $row, 'destination_property');
return $actual; return $actual;
} }
......
...@@ -29,8 +29,8 @@ ...@@ -29,8 +29,8 @@
* @endcode * @endcode
* *
* This will set new_text_field to the concatenation of the 'foo' and 'bar' * This will set new_text_field to the concatenation of the 'foo' and 'bar'
* source values. For example, if the 'foo' property is "wambooli" and the 'bar' * source values. For example, if the 'foo' property is "Rosa" and the 'bar'
* property is "pastafazoul", new_text_field will be "wamboolipastafazoul". * property is "Parks", new_text_field will be "RosaParks".
* *
* You can also specify a delimiter. * You can also specify a delimiter.
* *
...@@ -46,8 +46,8 @@ ...@@ -46,8 +46,8 @@
* *
* This will set new_text_field to the concatenation of the 'foo' source value, * This will set new_text_field to the concatenation of the 'foo' source value,
* the delimiter and the 'bar' source value. For example, using the values above * the delimiter and the 'bar' source value. For example, using the values above
* and "/" as the delimiter, if the 'foo' property is "wambooli" and the 'bar' * and "/" as the delimiter, if the 'foo' property is "Rosa" and the 'bar'
* property is "pastafazoul", new_text_field will be "wambooli/pastafazoul". * property is "Rosa", new_text_field will be "Rosa/Parks".
* *
* @see \Drupal\migrate\Plugin\MigrateProcessInterface * @see \Drupal\migrate\Plugin\MigrateProcessInterface
* *
......
...@@ -267,7 +267,7 @@ protected function doTransform($value) { ...@@ -267,7 +267,7 @@ protected function doTransform($value) {
$executable = $this->prophesize(MigrateExecutableInterface::class)->reveal(); $executable = $this->prophesize(MigrateExecutableInterface::class)->reveal();
$plugin = new Route([], 'route', [], $migration, $pathValidator); $plugin = new Route([], 'route', [], $migration, $pathValidator);
$actual = $plugin->transform($value, $executable, $row, 'destinationproperty'); $actual = $plugin->transform($value, $executable, $row, 'destination_property');
return $actual; return $actual;
} }
......
...@@ -35,7 +35,7 @@ public function testTransform() { ...@@ -35,7 +35,7 @@ public function testTransform() {
'Foo' => 'Bar', 'Foo' => 'Bar',
'foo bar' => 'bar foo', 'foo bar' => 'bar foo',
]; ];
$value = $this->plugin->transform($source, $this->migrateExecutable, $this->row, 'destinationproperty'); $value = $this->plugin->transform($source, $this->migrateExecutable, $this->row, 'destination_property');
$this->assertSame($value, $expected); $this->assertSame($value, $expected);
} }
...@@ -48,7 +48,7 @@ public function testNonExistentKey() { ...@@ -48,7 +48,7 @@ public function testNonExistentKey() {
]; ];
$this->expectException(MigrateException::class); $this->expectException(MigrateException::class);
$this->expectExceptionMessage("The key 'foo' does not exist"); $this->expectExceptionMessage("The key 'foo' does not exist");
$this->plugin->transform($source, $this->migrateExecutable, $this->row, 'destinationproperty'); $this->plugin->transform($source, $this->migrateExecutable, $this->row, 'destination_property');
} }
/** /**
...@@ -60,7 +60,7 @@ public function testNonExistentValue() { ...@@ -60,7 +60,7 @@ public function testNonExistentValue() {
]; ];
$this->expectException(MigrateException::class); $this->expectException(MigrateException::class);
$this->expectExceptionMessage("The key 'bar' does not exist"); $this->expectExceptionMessage("The key 'bar' does not exist");
$this->plugin->transform($source, $this->migrateExecutable, $this->row, 'destinationproperty'); $this->plugin->transform($source, $this->migrateExecutable, $this->row, 'destination_property');
} }
/** /**
...@@ -70,7 +70,7 @@ public function testOneDimensionalArrayInput() { ...@@ -70,7 +70,7 @@ public function testOneDimensionalArrayInput() {
$source = ['foo' => 'bar']; $source = ['foo' => 'bar'];
$this->expectException(MigrateException::class); $this->expectException(MigrateException::class);
$this->expectExceptionMessage('The input should be an array of arrays'); $this->expectExceptionMessage('The input should be an array of arrays');
$this->plugin->transform($source, $this->migrateExecutable, $this->row, 'destinationproperty'); $this->plugin->transform($source, $this->migrateExecutable, $this->row, 'destination_property');
} }
/** /**
...@@ -80,7 +80,7 @@ public function testStringInput() { ...@@ -80,7 +80,7 @@ public function testStringInput() {
$source = 'foo'; $source = 'foo';
$this->expectException(MigrateException::class); $this->expectException(MigrateException::class);
$this->expectExceptionMessage('The input should be an array of arrays'); $this->expectExceptionMessage('The input should be an array of arrays');
$this->plugin->transform($source, $this->migrateExecutable, $this->row, 'destinationproperty'); $this->plugin->transform($source, $this->migrateExecutable, $this->row, 'destination_property');
} }
} }
...@@ -19,7 +19,7 @@ class CallbackTest extends MigrateProcessTestCase { ...@@ -19,7 +19,7 @@ class CallbackTest extends MigrateProcessTestCase {
public function testCallback($callable) { public function testCallback($callable) {
$configuration = ['callable' => $callable]; $configuration = ['callable' => $callable];
$this->plugin = new Callback($configuration, 'map', []); $this->plugin = new Callback($configuration, 'map', []);
$value = $this->plugin->transform('FooBar', $this->migrateExecutable, $this->row, 'destinationproperty'); $value = $this->plugin->transform('FooBar', $this->migrateExecutable, $this->row, 'destination_property');
$this->assertSame('foobar', $value); $this->assertSame('foobar', $value);
} }
......
...@@ -29,7 +29,7 @@ protected function setUp() { ...@@ -29,7 +29,7 @@ protected function setUp() {
* Test concat works without a delimiter. * Test concat works without a delimiter.
*/ */
public function testConcatWithoutDelimiter() { public function testConcatWithoutDelimiter() {
$value = $this->plugin->transform(['foo', 'bar'], $this->migrateExecutable, $this->row, 'destinationproperty'); $value = $this->plugin->transform(['foo', 'bar'], $this->migrateExecutable, $this->row, 'destination_property');
$this->assertSame('foobar', $value); $this->assertSame('foobar', $value);
} }
...@@ -38,7 +38,7 @@ public function testConcatWithoutDelimiter() { ...@@ -38,7 +38,7 @@ public function testConcatWithoutDelimiter() {
*/ */
public function testConcatWithNonArray() { public function testConcatWithNonArray() {
$this->expectException(MigrateException::class); $this->expectException(MigrateException::class);
$this->plugin->transform('foo', $this->migrateExecutable, $this->row, 'destinationproperty'); $this->plugin->transform('foo', $this->migrateExecutable, $this->row, 'destination_property');
} }
/** /**
...@@ -46,7 +46,7 @@ public function testConcatWithNonArray() { ...@@ -46,7 +46,7 @@ public function testConcatWithNonArray() {
*/ */
public function testConcatWithDelimiter() { public function testConcatWithDelimiter() {
$this->plugin->setDelimiter('_'); $this->plugin->setDelimiter('_');
$value = $this->plugin->transform(['foo', 'bar'], $this->migrateExecutable, $this->row, 'destinationproperty'); $value = $this->plugin->transform(['foo', 'bar'], $this->migrateExecutable, $this->row, 'destination_property');
$this->assertSame('foo_bar', $value); $this->assertSame('foo_bar', $value);
} }
......
...@@ -21,7 +21,7 @@ class DefaultValueTest extends MigrateProcessTestCase { ...@@ -21,7 +21,7 @@ class DefaultValueTest extends MigrateProcessTestCase {
*/ */
public function testDefaultValue($configuration, $expected_value, $value) { public function testDefaultValue($configuration, $expected_value, $value) {
$process = new DefaultValue($configuration, 'default_value', []); $process = new DefaultValue($configuration, 'default_value', []);
$value = $process->transform($value, $this->migrateExecutable, $this->row, 'destinationproperty'); $value = $process->transform($value, $this->migrateExecutable, $this->row, 'destination_property');
$this->assertSame($expected_value, $value); $this->assertSame($expected_value, $value);
} }
......
...@@ -28,7 +28,7 @@ protected function setUp() { ...@@ -28,7 +28,7 @@ protected function setUp() {
* Test explode transform process works. * Test explode transform process works.
*/ */
public function testTransform() { public function testTransform() {
$value = $this->plugin->transform('foo,bar,tik', $this->migrateExecutable, $this->row, 'destinationproperty'); $value = $this->plugin->transform('foo,bar,tik', $this->migrateExecutable, $this->row, 'destination_property');
$this->assertSame(['foo', 'bar', 'tik'], $value); $this->assertSame(['foo', 'bar', 'tik'], $value);
} }
...@@ -37,7 +37,7 @@ public function testTransform() { ...@@ -37,7 +37,7 @@ public function testTransform() {
*/ */
public function testTransformLimit() { public function testTransformLimit() {
$plugin = new Explode(['delimiter' => '_', 'limit' => 2], 'map', []); $plugin = new Explode(['delimiter' => '_', 'limit' => 2], 'map', []);
$value = $plugin->transform('foo_bar_tik', $this->migrateExecutable, $this->row, 'destinationproperty'); $value = $plugin->transform('foo_bar_tik', $this->migrateExecutable, $this->row, 'destination_property');
$this->assertSame(['foo', 'bar_tik'], $value); $this->assertSame(['foo', 'bar_tik'], $value);
} }
...@@ -45,10 +45,10 @@ public function testTransformLimit() { ...@@ -45,10 +45,10 @@ public function testTransformLimit() {
* Test if the explode process can be chained with a handles_multiple process. * Test if the explode process can be chained with a handles_multiple process.
*/ */
public function testChainedTransform() { public function testChainedTransform() {
$exploded = $this->plugin->transform('foo,bar,tik', $this->migrateExecutable, $this->row, 'destinationproperty'); $exploded = $this->plugin->transform('foo,bar,tik', $this->migrateExecutable, $this->row, 'destination_property');
$concat = new Concat([], 'map', []); $concat = new Concat([], 'map', []);
$concatenated = $concat->transform($exploded, $this->migrateExecutable, $this->row, 'destinationproperty'); $concatenated = $concat->transform($exploded, $this->migrateExecutable, $this->row, 'destination_property');
$this->assertSame('foobartik', $concatenated); $this->assertSame('foobartik', $concatenated);
} }
...@@ -58,7 +58,7 @@ public function testChainedTransform() { ...@@ -58,7 +58,7 @@ public function testChainedTransform() {
public function testExplodeWithNonString() { public function testExplodeWithNonString() {
$this->expectException(MigrateException::class); $this->expectException(MigrateException::class);
$this->expectExceptionMessage('is not a string'); $this->expectExceptionMessage('is not a string');
$this->plugin->transform(['foo'], $this->migrateExecutable, $this->row, 'destinationproperty'); $this->plugin->transform(['foo'], $this->migrateExecutable, $this->row, 'destination_property');
} }
/** /**
...@@ -69,7 +69,7 @@ public function testExplodeWithNonString() { ...@@ -69,7 +69,7 @@ public function testExplodeWithNonString() {
public function testExplodeWithNonStrictAndEmptySource($value, $expected) { public function testExplodeWithNonStrictAndEmptySource($value, $expected) {
$plugin = new Explode(['delimiter' => '|', 'strict' => FALSE], 'map', []); $plugin = new Explode(['delimiter' => '|', 'strict' => FALSE], 'map', []);
$processed = $plugin->transform($value, $this->migrateExecutable, $this->row, 'destinationproperty'); $processed = $plugin->transform($value, $this->migrateExecutable, $this->row, 'destination_property');
$this->assertSame($expected, $processed); $this->assertSame($expected, $processed);
} }
...@@ -96,7 +96,7 @@ public function testExplodeWithNonStrictAndNonCastable() { ...@@ -96,7 +96,7 @@ public function testExplodeWithNonStrictAndNonCastable() {
$plugin = new Explode(['delimiter' => '|', 'strict' => FALSE], 'map', []); $plugin = new Explode(['delimiter' => '|', 'strict' => FALSE], 'map', []);
$this->expectException(MigrateException::class); $this->expectException(MigrateException::class);
$this->expectExceptionMessage('cannot be casted to a string'); $this->expectExceptionMessage('cannot be casted to a string');
$processed = $plugin->transform(['foo'], $this->migrateExecutable, $this->row, 'destinationproperty'); $processed = $plugin->transform(['foo'], $this->migrateExecutable, $this->row, 'destination_property');
$this->assertSame(['foo'], $processed); $this->assertSame(['foo'], $processed);
} }
...@@ -106,7 +106,7 @@ public function testExplodeWithNonStrictAndNonCastable() { ...@@ -106,7 +106,7 @@ public function testExplodeWithNonStrictAndNonCastable() {
*/ */
public function testExplodeWithStrictAndEmptyString() { public function testExplodeWithStrictAndEmptyString() {
$plugin = new Explode(['delimiter' => '|'], 'map', []); $plugin = new Explode(['delimiter' => '|'], 'map', []);
$processed = $plugin->transform('', $this->migrateExecutable, $this->row, 'destinationproperty'); $processed = $plugin->transform('', $this->migrateExecutable, $this->row, 'destination_property');
$this->assertSame([''], $processed); $this->assertSame([''], $processed);
} }
...@@ -117,7 +117,7 @@ public function testExplodeWithEmptyDelimiter() { ...@@ -117,7 +117,7 @@ public function testExplodeWithEmptyDelimiter() {
$this->expectException(MigrateException::class); $this->expectException(MigrateException::class);
$this->expectExceptionMessage('delimiter is empty'); $this->expectExceptionMessage('delimiter is empty');
$plugin = new Explode(['delimiter' => ''], 'map', []); $plugin = new Explode(['delimiter' => ''], 'map', []);
$plugin->transform('foo,bar', $this->migrateExecutable, $this->row, 'destinationproperty'); $plugin->transform('foo,bar', $this->migrateExecutable, $this->row, 'destination_property');
} }
} }
...@@ -24,7 +24,7 @@ protected function setUp() { ...@@ -24,7 +24,7 @@ protected function setUp() {
* Tests successful extraction. * Tests successful extraction.
*/ */
public function testExtract() { public function testExtract() {
$value = $this->plugin->transform(['foo' => 'bar'], $this->migrateExecutable, $this->row, 'destinationproperty'); $value = $this->plugin->transform(['foo' => 'bar'], $this->migrateExecutable, $this->row, 'destination_property');
$this->assertSame('bar', $value); $this->assertSame('bar', $value);
} }
...@@ -34,7 +34,7 @@ public function testExtract() { ...@@ -34,7 +34,7 @@ public function testExtract() {
public function testExtractFromString() { public function testExtractFromString() {
$this->expectException(MigrateException::class); $this->expectException(MigrateException::class);
$this->expectExceptionMessage('Input should be an array.'); $this->expectExceptionMessage('Input should be an array.');
$this->plugin->transform('bar', $this->migrateExecutable, $this->row, 'destinationproperty'); $this->plugin->transform('bar', $this->migrateExecutable, $this->row, 'destination_property');
} }
/** /**
...@@ -43,7 +43,7 @@ public function testExtractFromString() { ...@@ -43,7 +43,7 @@ public function testExtractFromString() {
public function testExtractFail() { public function testExtractFail() {
$this->expectException(MigrateException::class); $this->expectException(MigrateException::class);
$this->expectExceptionMessage('Array index missing, extraction failed.'); $this->expectExceptionMessage('Array index missing, extraction failed.');
$this->plugin->transform(['bar' => 'foo'], $this->migrateExecutable, $this->row, 'destinationproperty'); $this->plugin->transform(['bar' => 'foo'], $this->migrateExecutable, $this->row, 'destination_property');
} }
/** /**
...@@ -51,7 +51,7 @@ public function testExtractFail() { ...@@ -51,7 +51,7 @@ public function testExtractFail() {
*/ */
public function testExtractFailDefault() { public function testExtractFailDefault() {
$plugin = new Extract(['index' => ['foo'], 'default' => 'test'], 'map', []); $plugin = new Extract(['index' => ['foo'], 'default' => 'test'], 'map', []);
$value = $plugin->transform(['bar' => 'foo'], $this->migrateExecutable, $this->row, 'destinationproperty'); $value = $plugin->transform(['bar' => 'foo'], $this->migrateExecutable, $this->row, 'destination_property');
$this->assertSame('test', $value, ''); $this->assertSame('test', $value, '');
} }
......
...@@ -16,7 +16,7 @@ class FlattenTest extends MigrateProcessTestCase { ...@@ -16,7 +16,7 @@ class FlattenTest extends MigrateProcessTestCase {
*/ */
public function testFlatten() { public function testFlatten() {
$plugin = new Flatten([], 'flatten', []); $plugin = new Flatten([], 'flatten', []);
$flattened = $plugin->transform([1, 2, [3, 4, [5]], [], [7, 8]], $this->migrateExecutable, $this->row, 'destinationproperty'); $flattened = $plugin->transform([1, 2, [3, 4, [5]], [], [7, 8]], $this->migrateExecutable, $this->row, 'destination_property');
$this->assertSame([1, 2, 3, 4, 5, 7, 8], $flattened); $this->assertSame([1, 2, 3, 4, 5, 7, 8], $flattened);
} }
......