Unverified Commit 3a730ce8 authored by Alex Pott's avatar Alex Pott
Browse files

Issue #3138766 by mohrerao, longwave, sja112, jameszhang023, Lal_,...

Issue #3138766 by mohrerao, longwave, sja112, jameszhang023, Lal_, ravi.shankar, jungle, xjm: Fix "Don't" relevant typos in core

(cherry picked from commit 3b668ff1)
parent f6356c64
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -67,10 +67,10 @@ public function setUp() {
    $this->savePaintings([
      ['colors' => ['red'], 'shapes' => ['triangle'], 'title' => 'FIND'],
      ['colors' => ['orange'], 'shapes' => ['circle'], 'title' => 'FIND'],
      ['colors' => ['orange'], 'shapes' => ['triangle'], 'title' => 'DONT_FIND'],
      ['colors' => ['orange'], 'shapes' => ['triangle'], 'title' => 'DO_NOT_FIND'],
      ['colors' => ['yellow'], 'shapes' => ['square'], 'title' => 'FIND'],
      ['colors' => ['yellow'], 'shapes' => ['triangle'], 'title' => 'DONT_FIND'],
      ['colors' => ['orange'], 'shapes' => ['square'], 'title' => 'DONT_FIND'],
      ['colors' => ['yellow'], 'shapes' => ['triangle'], 'title' => 'DO_NOT_FIND'],
      ['colors' => ['orange'], 'shapes' => ['square'], 'title' => 'DO_NOT_FIND'],
    ]);

    $this->nodeStorage = $this->container->get('entity_type.manager')->getStorage('node');
+2 −2
Original line number Diff line number Diff line
@@ -21,8 +21,8 @@ function migrate_prepare_row_test_migrate_prepare_row(Row $row, MigrateSourceInt
    // Record mapping but don't record a message.
    throw new MigrateSkipRowException('', TRUE);
  }
  elseif ($data == 'skip_and_dont_record') {
  elseif ($data == 'skip_and_do_not_record') {
    // Don't record mapping but record a message.
    throw new MigrateSkipRowException('skip_and_dont_record message', FALSE);
    throw new MigrateSkipRowException('skip_and_do_not_record message', FALSE);
  }
}
+1 −1
Original line number Diff line number Diff line
@@ -25,7 +25,7 @@ public function transform($value, MigrateExecutableInterface $migrate_executable
    if ($data == 'skip_and_record (use plugin)') {
      throw new MigrateSkipRowException('', TRUE);
    }
    elseif ($data == 'skip_and_dont_record (use plugin)') {
    elseif ($data == 'skip_and_do_not_record (use plugin)') {
      throw new MigrateSkipRowException('', FALSE);
    }
    return $value;
+3 −3
Original line number Diff line number Diff line
@@ -33,7 +33,7 @@ public function testPrepareRowSkip() {
        'plugin' => 'embedded_data',
        'data_rows' => [
          ['id' => '1', 'data' => 'skip_and_record'],
          ['id' => '2', 'data' => 'skip_and_dont_record'],
          ['id' => '2', 'data' => 'skip_and_do_not_record'],
        ],
        'ids' => [
          'id' => ['type' => 'string'],
@@ -69,7 +69,7 @@ public function testPrepareRowSkip() {
    $messages = $id_map_plugin->getMessages(['id' => 2])->fetchAll();
    $this->assertCount(1, $messages);
    $message = reset($messages);
    $this->assertEquals('skip_and_dont_record message', $message->message);
    $this->assertEquals('skip_and_do_not_record message', $message->message);
    $this->assertEquals(MigrationInterface::MESSAGE_INFORMATIONAL, $message->level);

    // Insert a custom processor in the process flow.
@@ -80,7 +80,7 @@ public function testPrepareRowSkip() {
    // Change data to avoid triggering again hook_migrate_prepare_row().
    $definition['source']['data_rows'] = [
      ['id' => '1', 'data' => 'skip_and_record (use plugin)'],
      ['id' => '2', 'data' => 'skip_and_dont_record (use plugin)'],
      ['id' => '2', 'data' => 'skip_and_do_not_record (use plugin)'],
    ];
    $migration = \Drupal::service('plugin.manager.migration')->createStubMigration($definition);

+1 −1
Original line number Diff line number Diff line
@@ -56,7 +56,7 @@ protected function setUp() {
  public function testSearchLabelXSS() {
    $this->drupalLogin($this->drupalCreateUser(['administer search']));

    $keys['label'] = '<script>alert("Dont Panic");</script>';
    $keys['label'] = '<script>alert("Don\'t Panic");</script>';
    $this->drupalPostForm('admin/config/search/pages/manage/node_search', $keys, t('Save search page'));

    $this->drupalLogin($this->searchingUser);
Loading