Unverified Commit 96a0e620 authored by Alex Pott's avatar Alex Pott
Browse files

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
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -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, '<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->assertTrue($visibility['request_path']['negate']);
    $this->assertSame('<front>', $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<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->assertFalse($visibility['request_path']['negate']);
    $this->assertSame("/foo\n/bar\n/baz\n<front>", $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, '<?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->assertFalse($visibility['php']['negate']);
    $this->assertSame('<?php', $visibility['php']['php']);
@@ -77,7 +77,7 @@ public function testTransformPhpEnabled() {
   */
  public function testTransformPhpDisabled() {
    $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);
  }

@@ -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, '<?php', []], $this->migrateExecutable, $this->row, 'destinationproperty');
    $this->plugin->transform([2, '<?php', []], $this->migrateExecutable, $this->row, 'destination_property');
  }

}
+2 −2
Original line number Diff line number Diff line
@@ -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);
  }
+1 −1
Original line number Diff line number Diff line
@@ -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);
  }

+3 −3
Original line number Diff line number Diff line
@@ -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');
  }

}
+3 −3
Original line number Diff line number Diff line
@@ -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');
  }

}
Loading