From 96a0e6206f0640e3f7ebb4c0dc9cfc2b793a122e Mon Sep 17 00:00:00 2001 From: Alex Pott Date: Mon, 3 Aug 2020 12:08:57 +0100 Subject: [PATCH] Issue #3160031 by quietone, alexpott, jungle, longwave, jameszhang023: Fix 18 spelling errors for migrate specific terms --- .../migrate/process/BlockVisibilityTest.php | 12 ++++++------ .../migrate/process/d6/FieldFileTest.php | 4 ++-- .../src/Unit/process/LanguageDomainsTest.php | 2 +- .../Unit/process/LanguageNegotiationTest.php | 6 +++--- .../src/Unit/process/LanguageTypesTest.php | 6 +++--- .../Plugin/migrate/process/LinkUriTest.php | 2 +- .../src/Plugin/migrate/process/Concat.php | 8 ++++---- .../tests/src/Kernel/process/RouteTest.php | 2 +- .../tests/src/Unit/process/ArrayBuildTest.php | 10 +++++----- .../tests/src/Unit/process/CallbackTest.php | 2 +- .../tests/src/Unit/process/ConcatTest.php | 6 +++--- .../src/Unit/process/DefaultValueTest.php | 2 +- .../tests/src/Unit/process/ExplodeTest.php | 18 +++++++++--------- .../tests/src/Unit/process/ExtractTest.php | 8 ++++---- .../tests/src/Unit/process/FlattenTest.php | 2 +- .../migrate/tests/src/Unit/process/GetTest.php | 10 +++++----- .../tests/src/Unit/process/MachineNameTest.php | 2 +- .../src/Unit/process/MenuLinkParentTest.php | 4 ++-- .../src/Unit/process/NullCoalesceTest.php | 8 ++++---- .../tests/src/Unit/process/SkipOnEmptyTest.php | 12 ++++++------ .../src/Unit/process/SkipRowIfNotSetTest.php | 4 ++-- .../tests/src/Unit/process/StaticMapTest.php | 16 ++++++++-------- .../tests/src/Unit/process/SubstrTest.php | 8 ++++---- .../migrate/process/ConvertTokensTest.php | 4 ++-- 24 files changed, 79 insertions(+), 79 deletions(-) diff --git a/core/modules/block/tests/src/Unit/Plugin/migrate/process/BlockVisibilityTest.php b/core/modules/block/tests/src/Unit/Plugin/migrate/process/BlockVisibilityTest.php index d3649b77a7..58517793a9 100644 --- a/core/modules/block/tests/src/Unit/Plugin/migrate/process/BlockVisibilityTest.php +++ b/core/modules/block/tests/src/Unit/Plugin/migrate/process/BlockVisibilityTest.php @@ -37,7 +37,7 @@ protected function setUp() { * @covers ::transform */ 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); } @@ -45,7 +45,7 @@ public function testTransformNoData() { * @covers ::transform */ public function testTransformSinglePageWithFront() { - $visibility = $this->plugin->transform([0, '', []], $this->migrateExecutable, $this->row, 'destinationproperty'); + $visibility = $this->plugin->transform([0, '', []], $this->migrateExecutable, $this->row, 'destination_property'); $this->assertSame('request_path', $visibility['request_path']['id']); $this->assertTrue($visibility['request_path']['negate']); $this->assertSame('', $visibility['request_path']['pages']); @@ -55,7 +55,7 @@ public function testTransformSinglePageWithFront() { * @covers ::transform */ public function testTransformMultiplePagesWithFront() { - $visibility = $this->plugin->transform([1, "foo\n/bar\rbaz\r\n", []], $this->migrateExecutable, $this->row, 'destinationproperty'); + $visibility = $this->plugin->transform([1, "foo\n/bar\rbaz\r\n", []], $this->migrateExecutable, $this->row, 'destination_property'); $this->assertSame('request_path', $visibility['request_path']['id']); $this->assertFalse($visibility['request_path']['negate']); $this->assertSame("/foo\n/bar\n/baz\n", $visibility['request_path']['pages']); @@ -66,7 +66,7 @@ public function testTransformMultiplePagesWithFront() { */ public function testTransformPhpEnabled() { $this->moduleHandler->moduleExists('php')->willReturn(TRUE); - $visibility = $this->plugin->transform([2, 'migrateExecutable, $this->row, 'destinationproperty'); + $visibility = $this->plugin->transform([2, 'migrateExecutable, $this->row, 'destination_property'); $this->assertSame('php', $visibility['php']['id']); $this->assertFalse($visibility['php']['negate']); $this->assertSame('moduleHandler->moduleExists('php')->willReturn(FALSE); - $transformed_value = $this->plugin->transform([2, 'migrateExecutable, $this->row, 'destinationproperty'); + $transformed_value = $this->plugin->transform([2, 'migrateExecutable, $this->row, 'destination_property'); $this->assertEmpty($transformed_value); } @@ -97,7 +97,7 @@ public function testTransformException() { $this->plugin = new BlockVisibility(['skip_php' => TRUE], 'block_visibility_pages', [], $this->moduleHandler->reveal(), $migrate_lookup->reveal()); $this->expectException(MigrateSkipRowException::class); $this->expectExceptionMessage("The block with bid '99' from module 'foobar' will have no PHP or request_path visibility configuration."); - $this->plugin->transform([2, 'migrateExecutable, $this->row, 'destinationproperty'); + $this->plugin->transform([2, 'migrateExecutable, $this->row, 'destination_property'); } } diff --git a/core/modules/file/tests/src/Unit/Plugin/migrate/process/d6/FieldFileTest.php b/core/modules/file/tests/src/Unit/Plugin/migrate/process/d6/FieldFileTest.php index 4ee95841b1..6c99e30bd1 100644 --- a/core/modules/file/tests/src/Unit/Plugin/migrate/process/d6/FieldFileTest.php +++ b/core/modules/file/tests/src/Unit/Plugin/migrate/process/d6/FieldFileTest.php @@ -31,7 +31,7 @@ public function testTransformAltTitle() { $options = [ 'alt' => 'Foobaz', - 'title' => 'Wambooli', + 'title' => 'Bar', ]; $value = [ 'fid' => 1, @@ -45,7 +45,7 @@ public function testTransformAltTitle() { 'display' => TRUE, 'description' => '', 'alt' => 'Foobaz', - 'title' => 'Wambooli', + 'title' => 'Bar', ]; $this->assertSame($expected, $transformed); } diff --git a/core/modules/language/tests/src/Unit/process/LanguageDomainsTest.php b/core/modules/language/tests/src/Unit/process/LanguageDomainsTest.php index 022fc4e6cd..7e9640915d 100644 --- a/core/modules/language/tests/src/Unit/process/LanguageDomainsTest.php +++ b/core/modules/language/tests/src/Unit/process/LanguageDomainsTest.php @@ -55,7 +55,7 @@ public function testTransform() { 'es' => 'es.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); } diff --git a/core/modules/language/tests/src/Unit/process/LanguageNegotiationTest.php b/core/modules/language/tests/src/Unit/process/LanguageNegotiationTest.php index 27aa0999ea..af8b6443ff 100644 --- a/core/modules/language/tests/src/Unit/process/LanguageNegotiationTest.php +++ b/core/modules/language/tests/src/Unit/process/LanguageNegotiationTest.php @@ -50,7 +50,7 @@ public function testTransformWithWeights() { '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); } @@ -70,7 +70,7 @@ public function testTransformWithoutWeights() { '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); } @@ -81,7 +81,7 @@ public function testStringInput() { $this->plugin = new LanguageNegotiation([], 'map', []); $this->expectException(MigrateException::class); $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'); } } diff --git a/core/modules/language/tests/src/Unit/process/LanguageTypesTest.php b/core/modules/language/tests/src/Unit/process/LanguageTypesTest.php index b65c9d0508..3b41a66825 100644 --- a/core/modules/language/tests/src/Unit/process/LanguageTypesTest.php +++ b/core/modules/language/tests/src/Unit/process/LanguageTypesTest.php @@ -27,7 +27,7 @@ public function testTransformAll() { 1 => 'language_content', 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); } @@ -44,7 +44,7 @@ public function testTransformConfigurable() { $expected = [ 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); } @@ -55,7 +55,7 @@ public function testStringInput() { $this->plugin = new LanguageTypes([], 'map', []); $this->expectException(MigrateException::class); $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'); } } diff --git a/core/modules/menu_link_content/tests/src/Kernel/Plugin/migrate/process/LinkUriTest.php b/core/modules/menu_link_content/tests/src/Kernel/Plugin/migrate/process/LinkUriTest.php index 2c7928b172..391ee95e4a 100644 --- a/core/modules/menu_link_content/tests/src/Kernel/Plugin/migrate/process/LinkUriTest.php +++ b/core/modules/menu_link_content/tests/src/Kernel/Plugin/migrate/process/LinkUriTest.php @@ -199,7 +199,7 @@ public function doTransform($value, $configuration = []) { $executable = $this->prophesize(MigrateExecutableInterface::class)->reveal(); $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; } diff --git a/core/modules/migrate/src/Plugin/migrate/process/Concat.php b/core/modules/migrate/src/Plugin/migrate/process/Concat.php index e3323b4b04..3490ae81e3 100644 --- a/core/modules/migrate/src/Plugin/migrate/process/Concat.php +++ b/core/modules/migrate/src/Plugin/migrate/process/Concat.php @@ -29,8 +29,8 @@ * @endcode * * 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' - * property is "pastafazoul", new_text_field will be "wamboolipastafazoul". + * source values. For example, if the 'foo' property is "Rosa" and the 'bar' + * property is "Parks", new_text_field will be "RosaParks". * * You can also specify a delimiter. * @@ -46,8 +46,8 @@ * * 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 - * and "/" as the delimiter, if the 'foo' property is "wambooli" and the 'bar' - * property is "pastafazoul", new_text_field will be "wambooli/pastafazoul". + * and "/" as the delimiter, if the 'foo' property is "Rosa" and the 'bar' + * property is "Rosa", new_text_field will be "Rosa/Parks". * * @see \Drupal\migrate\Plugin\MigrateProcessInterface * diff --git a/core/modules/migrate/tests/src/Kernel/process/RouteTest.php b/core/modules/migrate/tests/src/Kernel/process/RouteTest.php index b592fc3215..992201797a 100644 --- a/core/modules/migrate/tests/src/Kernel/process/RouteTest.php +++ b/core/modules/migrate/tests/src/Kernel/process/RouteTest.php @@ -267,7 +267,7 @@ protected function doTransform($value) { $executable = $this->prophesize(MigrateExecutableInterface::class)->reveal(); $plugin = new Route([], 'route', [], $migration, $pathValidator); - $actual = $plugin->transform($value, $executable, $row, 'destinationproperty'); + $actual = $plugin->transform($value, $executable, $row, 'destination_property'); return $actual; } diff --git a/core/modules/migrate/tests/src/Unit/process/ArrayBuildTest.php b/core/modules/migrate/tests/src/Unit/process/ArrayBuildTest.php index 66ffedddce..c0669bbf8c 100644 --- a/core/modules/migrate/tests/src/Unit/process/ArrayBuildTest.php +++ b/core/modules/migrate/tests/src/Unit/process/ArrayBuildTest.php @@ -35,7 +35,7 @@ public function testTransform() { 'Foo' => 'Bar', '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); } @@ -48,7 +48,7 @@ public function testNonExistentKey() { ]; $this->expectException(MigrateException::class); $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() { ]; $this->expectException(MigrateException::class); $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() { $source = ['foo' => 'bar']; $this->expectException(MigrateException::class); $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() { $source = 'foo'; $this->expectException(MigrateException::class); $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'); } } diff --git a/core/modules/migrate/tests/src/Unit/process/CallbackTest.php b/core/modules/migrate/tests/src/Unit/process/CallbackTest.php index 260e9a7a20..b34ce15b4b 100644 --- a/core/modules/migrate/tests/src/Unit/process/CallbackTest.php +++ b/core/modules/migrate/tests/src/Unit/process/CallbackTest.php @@ -19,7 +19,7 @@ class CallbackTest extends MigrateProcessTestCase { public function testCallback($callable) { $configuration = ['callable' => $callable]; $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); } diff --git a/core/modules/migrate/tests/src/Unit/process/ConcatTest.php b/core/modules/migrate/tests/src/Unit/process/ConcatTest.php index 6f6181d84d..cfca12cda7 100644 --- a/core/modules/migrate/tests/src/Unit/process/ConcatTest.php +++ b/core/modules/migrate/tests/src/Unit/process/ConcatTest.php @@ -29,7 +29,7 @@ protected function setUp() { * Test concat works without a delimiter. */ 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); } @@ -38,7 +38,7 @@ public function testConcatWithoutDelimiter() { */ public function testConcatWithNonArray() { $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() { */ public function testConcatWithDelimiter() { $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); } diff --git a/core/modules/migrate/tests/src/Unit/process/DefaultValueTest.php b/core/modules/migrate/tests/src/Unit/process/DefaultValueTest.php index 85496f9d5b..82fb728c7a 100644 --- a/core/modules/migrate/tests/src/Unit/process/DefaultValueTest.php +++ b/core/modules/migrate/tests/src/Unit/process/DefaultValueTest.php @@ -21,7 +21,7 @@ class DefaultValueTest extends MigrateProcessTestCase { */ public function testDefaultValue($configuration, $expected_value, $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); } diff --git a/core/modules/migrate/tests/src/Unit/process/ExplodeTest.php b/core/modules/migrate/tests/src/Unit/process/ExplodeTest.php index 2d3f0be320..1ad8ab7996 100644 --- a/core/modules/migrate/tests/src/Unit/process/ExplodeTest.php +++ b/core/modules/migrate/tests/src/Unit/process/ExplodeTest.php @@ -28,7 +28,7 @@ protected function setUp() { * Test explode transform process works. */ 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); } @@ -37,7 +37,7 @@ public function testTransform() { */ public function testTransformLimit() { $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); } @@ -45,10 +45,10 @@ public function testTransformLimit() { * Test if the explode process can be chained with a handles_multiple process. */ 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', []); - $concatenated = $concat->transform($exploded, $this->migrateExecutable, $this->row, 'destinationproperty'); + $concatenated = $concat->transform($exploded, $this->migrateExecutable, $this->row, 'destination_property'); $this->assertSame('foobartik', $concatenated); } @@ -58,7 +58,7 @@ public function testChainedTransform() { public function testExplodeWithNonString() { $this->expectException(MigrateException::class); $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() { public function testExplodeWithNonStrictAndEmptySource($value, $expected) { $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); } @@ -96,7 +96,7 @@ public function testExplodeWithNonStrictAndNonCastable() { $plugin = new Explode(['delimiter' => '|', 'strict' => FALSE], 'map', []); $this->expectException(MigrateException::class); $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); } @@ -106,7 +106,7 @@ public function testExplodeWithNonStrictAndNonCastable() { */ public function testExplodeWithStrictAndEmptyString() { $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); } @@ -117,7 +117,7 @@ public function testExplodeWithEmptyDelimiter() { $this->expectException(MigrateException::class); $this->expectExceptionMessage('delimiter is empty'); $plugin = new Explode(['delimiter' => ''], 'map', []); - $plugin->transform('foo,bar', $this->migrateExecutable, $this->row, 'destinationproperty'); + $plugin->transform('foo,bar', $this->migrateExecutable, $this->row, 'destination_property'); } } diff --git a/core/modules/migrate/tests/src/Unit/process/ExtractTest.php b/core/modules/migrate/tests/src/Unit/process/ExtractTest.php index 2af2dc3b78..d7f86aef37 100644 --- a/core/modules/migrate/tests/src/Unit/process/ExtractTest.php +++ b/core/modules/migrate/tests/src/Unit/process/ExtractTest.php @@ -24,7 +24,7 @@ protected function setUp() { * Tests successful extraction. */ 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); } @@ -34,7 +34,7 @@ public function testExtract() { public function testExtractFromString() { $this->expectException(MigrateException::class); $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() { public function testExtractFail() { $this->expectException(MigrateException::class); $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() { */ public function testExtractFailDefault() { $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, ''); } diff --git a/core/modules/migrate/tests/src/Unit/process/FlattenTest.php b/core/modules/migrate/tests/src/Unit/process/FlattenTest.php index 496cf92216..899644f5ae 100644 --- a/core/modules/migrate/tests/src/Unit/process/FlattenTest.php +++ b/core/modules/migrate/tests/src/Unit/process/FlattenTest.php @@ -16,7 +16,7 @@ class FlattenTest extends MigrateProcessTestCase { */ public function testFlatten() { $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); } diff --git a/core/modules/migrate/tests/src/Unit/process/GetTest.php b/core/modules/migrate/tests/src/Unit/process/GetTest.php index bc9065c63e..bb6c177019 100644 --- a/core/modules/migrate/tests/src/Unit/process/GetTest.php +++ b/core/modules/migrate/tests/src/Unit/process/GetTest.php @@ -20,7 +20,7 @@ public function testTransformSourceString() { ->with('test') ->will($this->returnValue('source_value')); $this->plugin = new Get(['source' => 'test'], '', []); - $value = $this->plugin->transform(NULL, $this->migrateExecutable, $this->row, 'destinationproperty'); + $value = $this->plugin->transform(NULL, $this->migrateExecutable, $this->row, 'destination_property'); $this->assertSame('source_value', $value); } @@ -38,7 +38,7 @@ public function testTransformSourceArray() { ->will($this->returnCallback(function ($argument) use ($map) { return $map[$argument]; })); - $value = $this->plugin->transform(NULL, $this->migrateExecutable, $this->row, 'destinationproperty'); + $value = $this->plugin->transform(NULL, $this->migrateExecutable, $this->row, 'destination_property'); $this->assertSame(['source_value1', 'source_value2'], $value); } @@ -51,7 +51,7 @@ public function testTransformSourceStringAt() { ->with('@@test') ->will($this->returnValue('source_value')); $this->plugin = new Get(['source' => '@@test'], '', []); - $value = $this->plugin->transform(NULL, $this->migrateExecutable, $this->row, 'destinationproperty'); + $value = $this->plugin->transform(NULL, $this->migrateExecutable, $this->row, 'destination_property'); $this->assertSame('source_value', $value); } @@ -71,7 +71,7 @@ public function testTransformSourceArrayAt() { ->will($this->returnCallback(function ($argument) use ($map) { return $map[$argument]; })); - $value = $this->plugin->transform(NULL, $this->migrateExecutable, $this->row, 'destinationproperty'); + $value = $this->plugin->transform(NULL, $this->migrateExecutable, $this->row, 'destination_property'); $this->assertSame(['source_value1', 'source_value2', 'source_value3', 'source_value4'], $value); } @@ -86,7 +86,7 @@ public function testIntegerValues($source, $expected_value) { ->willReturnOnConsecutiveCalls('val1', 'val2'); $this->plugin = new Get(['source' => $source], '', []); - $return = $this->plugin->transform(NULL, $this->migrateExecutable, $this->row, 'destinationproperty'); + $return = $this->plugin->transform(NULL, $this->migrateExecutable, $this->row, 'destination_property'); $this->assertSame($expected_value, $return); } diff --git a/core/modules/migrate/tests/src/Unit/process/MachineNameTest.php b/core/modules/migrate/tests/src/Unit/process/MachineNameTest.php index 5bc91587bb..06aa4024e8 100644 --- a/core/modules/migrate/tests/src/Unit/process/MachineNameTest.php +++ b/core/modules/migrate/tests/src/Unit/process/MachineNameTest.php @@ -54,7 +54,7 @@ public function testMachineNames() { ->will($this->returnValue($human_name_ascii . 'aeo')); $plugin = new MachineName([], 'machine_name', [], $this->transliteration); - $value = $plugin->transform($human_name, $this->migrateExecutable, $this->row, 'destinationproperty'); + $value = $plugin->transform($human_name, $this->migrateExecutable, $this->row, 'destination_property'); $this->assertEquals($expected_result, $value); } diff --git a/core/modules/migrate/tests/src/Unit/process/MenuLinkParentTest.php b/core/modules/migrate/tests/src/Unit/process/MenuLinkParentTest.php index d207be0c06..11bcade24f 100644 --- a/core/modules/migrate/tests/src/Unit/process/MenuLinkParentTest.php +++ b/core/modules/migrate/tests/src/Unit/process/MenuLinkParentTest.php @@ -72,7 +72,7 @@ public function testTransformException() { $plugin = new MenuLinkParent([], 'map', [], $this->migrateLookup->reveal(), $this->menuLinkManager->reveal(), $this->menuLinkStorage->reveal(), $this->migration->reveal()); $this->expectException(MigrateSkipRowException::class); $this->expectExceptionMessage("No parent link found for plid '1' in menu 'admin'."); - $plugin->transform([1, 'admin', NULL], $this->migrateExecutable, $this->row, 'destinationproperty'); + $plugin->transform([1, 'admin', NULL], $this->migrateExecutable, $this->row, 'destination_property'); } /** @@ -92,7 +92,7 @@ public function testTransformExternal() { $this->menuLinkManager->createInstance('menu_link_content:fe151460-dfa2-4133-8864-c1746f28ab27')->willReturn($plugin->reveal()); $plugin = new MenuLinkParent([], 'map', [], $this->migrateLookup->reveal(), $this->menuLinkManager->reveal(), $this->menuLinkStorage->reveal(), $this->migration->reveal()); - $result = $plugin->transform([1, 'admin', 'http://example.com'], $this->migrateExecutable, $this->row, 'destinationproperty'); + $result = $plugin->transform([1, 'admin', 'http://example.com'], $this->migrateExecutable, $this->row, 'destination_property'); $this->assertEquals('menu_link_content:fe151460-dfa2-4133-8864-c1746f28ab27', $result); } diff --git a/core/modules/migrate/tests/src/Unit/process/NullCoalesceTest.php b/core/modules/migrate/tests/src/Unit/process/NullCoalesceTest.php index 8779be98fa..6641a1deb6 100644 --- a/core/modules/migrate/tests/src/Unit/process/NullCoalesceTest.php +++ b/core/modules/migrate/tests/src/Unit/process/NullCoalesceTest.php @@ -21,7 +21,7 @@ class NullCoalesceTest extends MigrateProcessTestCase { */ public function testExceptionOnInvalidValue() { $this->expectException(MigrateException::class); - (new NullCoalesce([], 'null_coalesce', []))->transform('invalid', $this->migrateExecutable, $this->row, 'destinationproperty'); + (new NullCoalesce([], 'null_coalesce', []))->transform('invalid', $this->migrateExecutable, $this->row, 'destination_property'); } /** @@ -40,7 +40,7 @@ public function testExceptionOnInvalidValue() { */ public function testTransform(array $source, $expected_result) { $plugin = new NullCoalesce([], 'null_coalesce', []); - $result = $plugin->transform($source, $this->migrateExecutable, $this->row, 'destinationproperty'); + $result = $plugin->transform($source, $this->migrateExecutable, $this->row, 'destination_property'); $this->assertSame($expected_result, $result); } @@ -83,10 +83,10 @@ public function transformDataProvider() { */ public function testTransformWithDefault() { $plugin = new NullCoalesce(['default_value' => 'default'], 'null_coalesce', []); - $result = $plugin->transform([NULL, NULL, 'Test', 'Test 2'], $this->migrateExecutable, $this->row, 'destinationproperty'); + $result = $plugin->transform([NULL, NULL, 'Test', 'Test 2'], $this->migrateExecutable, $this->row, 'destination_property'); $this->assertSame('Test', $result); - $this->assertSame('default', $plugin->transform([NULL, NULL], $this->migrateExecutable, $this->row, 'destinationproperty')); + $this->assertSame('default', $plugin->transform([NULL, NULL], $this->migrateExecutable, $this->row, 'destination_property')); } } diff --git a/core/modules/migrate/tests/src/Unit/process/SkipOnEmptyTest.php b/core/modules/migrate/tests/src/Unit/process/SkipOnEmptyTest.php index 56e85cd4a2..0f2ddf8e00 100644 --- a/core/modules/migrate/tests/src/Unit/process/SkipOnEmptyTest.php +++ b/core/modules/migrate/tests/src/Unit/process/SkipOnEmptyTest.php @@ -21,7 +21,7 @@ public function testProcessSkipsOnEmpty() { $configuration['method'] = 'process'; $this->expectException(MigrateSkipProcessException::class); (new SkipOnEmpty($configuration, 'skip_on_empty', [])) - ->transform('', $this->migrateExecutable, $this->row, 'destinationproperty'); + ->transform('', $this->migrateExecutable, $this->row, 'destination_property'); } /** @@ -30,7 +30,7 @@ public function testProcessSkipsOnEmpty() { public function testProcessBypassesOnNonEmpty() { $configuration['method'] = 'process'; $value = (new SkipOnEmpty($configuration, 'skip_on_empty', [])) - ->transform(' ', $this->migrateExecutable, $this->row, 'destinationproperty'); + ->transform(' ', $this->migrateExecutable, $this->row, 'destination_property'); $this->assertSame(' ', $value); } @@ -41,7 +41,7 @@ public function testRowSkipsOnEmpty() { $configuration['method'] = 'row'; $this->expectException(MigrateSkipRowException::class); (new SkipOnEmpty($configuration, 'skip_on_empty', [])) - ->transform('', $this->migrateExecutable, $this->row, 'destinationproperty'); + ->transform('', $this->migrateExecutable, $this->row, 'destination_property'); } /** @@ -50,7 +50,7 @@ public function testRowSkipsOnEmpty() { public function testRowBypassesOnNonEmpty() { $configuration['method'] = 'row'; $value = (new SkipOnEmpty($configuration, 'skip_on_empty', [])) - ->transform(' ', $this->migrateExecutable, $this->row, 'destinationproperty'); + ->transform(' ', $this->migrateExecutable, $this->row, 'destination_property'); $this->assertSame(' ', $value); } @@ -65,7 +65,7 @@ public function testRowSkipWithoutMessage() { ]; $process = new SkipOnEmpty($configuration, 'skip_on_empty', []); $this->expectException(MigrateSkipRowException::class); - $process->transform('', $this->migrateExecutable, $this->row, 'destinationproperty'); + $process->transform('', $this->migrateExecutable, $this->row, 'destination_property'); } /** @@ -81,7 +81,7 @@ public function testRowSkipWithMessage() { $process = new SkipOnEmpty($configuration, 'skip_on_empty', []); $this->expectException(MigrateSkipRowException::class); $this->expectExceptionMessage('The value is empty'); - $process->transform('', $this->migrateExecutable, $this->row, 'destinationproperty'); + $process->transform('', $this->migrateExecutable, $this->row, 'destination_property'); } } diff --git a/core/modules/migrate/tests/src/Unit/process/SkipRowIfNotSetTest.php b/core/modules/migrate/tests/src/Unit/process/SkipRowIfNotSetTest.php index 21c8aa0710..acd33d3d77 100644 --- a/core/modules/migrate/tests/src/Unit/process/SkipRowIfNotSetTest.php +++ b/core/modules/migrate/tests/src/Unit/process/SkipRowIfNotSetTest.php @@ -24,7 +24,7 @@ public function testRowSkipWithoutMessage() { ]; $process = new SkipRowIfNotSet($configuration, 'skip_row_if_not_set', []); $this->expectException(MigrateSkipRowException::class); - $process->transform('', $this->migrateExecutable, $this->row, 'destinationproperty'); + $process->transform('', $this->migrateExecutable, $this->row, 'destination_property'); } /** @@ -40,7 +40,7 @@ public function testRowSkipWithMessage() { $process = new SkipRowIfNotSet($configuration, 'skip_row_if_not_set', []); $this->expectException(MigrateSkipRowException::class); $this->expectExceptionMessage("The 'some_key' key is not set"); - $process->transform('', $this->migrateExecutable, $this->row, 'destinationproperty'); + $process->transform('', $this->migrateExecutable, $this->row, 'destination_property'); } } diff --git a/core/modules/migrate/tests/src/Unit/process/StaticMapTest.php b/core/modules/migrate/tests/src/Unit/process/StaticMapTest.php index cc77c393cd..bcf1bd77a4 100644 --- a/core/modules/migrate/tests/src/Unit/process/StaticMapTest.php +++ b/core/modules/migrate/tests/src/Unit/process/StaticMapTest.php @@ -27,7 +27,7 @@ protected function setUp() { * Tests map when the source is a string. */ public function testMapWithSourceString() { - $value = $this->plugin->transform('foo', $this->migrateExecutable, $this->row, 'destinationproperty'); + $value = $this->plugin->transform('foo', $this->migrateExecutable, $this->row, 'destination_property'); $this->assertSame(['bar' => 'baz'], $value); } @@ -35,7 +35,7 @@ public function testMapWithSourceString() { * Tests map when the source is a list. */ public function testMapWithSourceList() { - $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('baz', $value); } @@ -44,7 +44,7 @@ public function testMapWithSourceList() { */ public function testMapwithEmptySource() { $this->expectException(MigrateException::class); - $this->plugin->transform([], $this->migrateExecutable, $this->row, 'destinationproperty'); + $this->plugin->transform([], $this->migrateExecutable, $this->row, 'destination_property'); } /** @@ -52,8 +52,8 @@ public function testMapwithEmptySource() { */ public function testMapwithInvalidSource() { $this->expectException(MigrateSkipRowException::class); - $this->expectExceptionMessage(sprintf("No static mapping found for '%s' and no default value provided for destination '%s'.", Variable::export(['bar']), 'destinationproperty')); - $this->plugin->transform(['bar'], $this->migrateExecutable, $this->row, 'destinationproperty'); + $this->expectExceptionMessage(sprintf("No static mapping found for '%s' and no default value provided for destination '%s'.", Variable::export(['bar']), 'destination_property')); + $this->plugin->transform(['bar'], $this->migrateExecutable, $this->row, 'destination_property'); } /** @@ -63,7 +63,7 @@ public function testMapWithInvalidSourceWithADefaultValue() { $configuration['map']['foo']['bar'] = 'baz'; $configuration['default_value'] = 'test'; $this->plugin = new StaticMap($configuration, 'map', []); - $value = $this->plugin->transform(['bar'], $this->migrateExecutable, $this->row, 'destinationproperty'); + $value = $this->plugin->transform(['bar'], $this->migrateExecutable, $this->row, 'destination_property'); $this->assertSame('test', $value); } @@ -74,7 +74,7 @@ public function testMapWithInvalidSourceWithANullDefaultValue() { $configuration['map']['foo']['bar'] = 'baz'; $configuration['default_value'] = NULL; $this->plugin = new StaticMap($configuration, 'map', []); - $value = $this->plugin->transform(['bar'], $this->migrateExecutable, $this->row, 'destinationproperty'); + $value = $this->plugin->transform(['bar'], $this->migrateExecutable, $this->row, 'destination_property'); $this->assertNull($value); } @@ -88,7 +88,7 @@ public function testMapWithInvalidSourceAndBypass() { $this->plugin = new StaticMap($configuration, 'map', []); $this->expectException(MigrateException::class); $this->expectExceptionMessage('Setting both default_value and bypass is invalid.'); - $this->plugin->transform(['bar'], $this->migrateExecutable, $this->row, 'destinationproperty'); + $this->plugin->transform(['bar'], $this->migrateExecutable, $this->row, 'destination_property'); } } diff --git a/core/modules/migrate/tests/src/Unit/process/SubstrTest.php b/core/modules/migrate/tests/src/Unit/process/SubstrTest.php index 54ef1c2b21..934e5f16c2 100644 --- a/core/modules/migrate/tests/src/Unit/process/SubstrTest.php +++ b/core/modules/migrate/tests/src/Unit/process/SubstrTest.php @@ -30,7 +30,7 @@ public function testSubstr($start = NULL, $length = NULL, $expected = NULL) { $configuration['start'] = $start; $configuration['length'] = $length; $this->plugin = new Substr($configuration, 'map', []); - $value = $this->plugin->transform('Captain Janeway', $this->migrateExecutable, $this->row, 'destinationproperty'); + $value = $this->plugin->transform('Captain Janeway', $this->migrateExecutable, $this->row, 'destination_property'); $this->assertSame($expected, $value); } @@ -62,7 +62,7 @@ public function testSubstrFail() { $this->plugin = new Substr($configuration, 'map', []); $this->expectException(MigrateException::class); $this->expectExceptionMessage('The input value must be a string.'); - $this->plugin->transform(['Captain Janeway'], $this->migrateExecutable, $this->row, 'destinationproperty'); + $this->plugin->transform(['Captain Janeway'], $this->migrateExecutable, $this->row, 'destination_property'); } /** @@ -73,7 +73,7 @@ public function testStartIsString() { $this->plugin = new Substr($configuration, 'map', []); $this->expectException(MigrateException::class); $this->expectExceptionMessage('The start position configuration value should be an integer. Omit this key to capture from the beginning of the string.'); - $this->plugin->transform(['foo'], $this->migrateExecutable, $this->row, 'destinationproperty'); + $this->plugin->transform(['foo'], $this->migrateExecutable, $this->row, 'destination_property'); } /** @@ -84,7 +84,7 @@ public function testLengthIsString() { $this->plugin = new Substr($configuration, 'map', []); $this->expectException(MigrateException::class); $this->expectExceptionMessage('The character length configuration value should be an integer. Omit this key to capture from the start position to the end of the string.'); - $this->plugin->transform(['foo'], $this->migrateExecutable, $this->row, 'destinationproperty'); + $this->plugin->transform(['foo'], $this->migrateExecutable, $this->row, 'destination_property'); } } diff --git a/core/modules/user/tests/src/Unit/Plugin/migrate/process/ConvertTokensTest.php b/core/modules/user/tests/src/Unit/Plugin/migrate/process/ConvertTokensTest.php index ddd731f833..873972b882 100644 --- a/core/modules/user/tests/src/Unit/Plugin/migrate/process/ConvertTokensTest.php +++ b/core/modules/user/tests/src/Unit/Plugin/migrate/process/ConvertTokensTest.php @@ -24,7 +24,7 @@ protected function setUp() { * Tests conversion of user tokens. */ public function testConvertTokens() { - $value = $this->plugin->transform('Account details for !username at !site', $this->migrateExecutable, $this->row, 'destinationproperty'); + $value = $this->plugin->transform('Account details for !username at !site', $this->migrateExecutable, $this->row, 'destination_property'); $this->assertEquals('Account details for [user:name] at [site:name]', $value); } @@ -32,7 +32,7 @@ public function testConvertTokens() { * Tests conversion of user tokens with a NULL value. */ public function testConvertTokensNull() { - $value = $this->plugin->transform(NULL, $this->migrateExecutable, $this->row, 'destinationproperty'); + $value = $this->plugin->transform(NULL, $this->migrateExecutable, $this->row, 'destination_property'); $this->assertEquals('', $value); } -- GitLab