diff --git a/core/lib/Drupal/Core/Command/DbDumpCommand.php b/core/lib/Drupal/Core/Command/DbDumpCommand.php index aa81af0..44dc2ac 100644 --- a/core/lib/Drupal/Core/Command/DbDumpCommand.php +++ b/core/lib/Drupal/Core/Command/DbDumpCommand.php @@ -414,10 +414,12 @@ protected function getTableScript($table, array $schema, array $data) { foreach ($data as $record) { $insert .= "->values(" . Variable::export($record) . ")\n"; } - $output .= "\$connection->insert('" . $table . "')\n" - . "->fields(" . Variable::export(array_keys($schema['fields'])) . ")\n" - . $insert - . "->execute();\n\n"; + $output .= implode('', [ + "\$connection->insert('" . $table . "')\n", + "->fields(" . Variable::export(array_keys($schema['fields'])) . ")\n", + $insert, + "->execute();\n\n", + ]); } return $output; } diff --git a/core/modules/system/tests/src/Functional/Mail/HtmlToTextTest.php b/core/modules/system/tests/src/Functional/Mail/HtmlToTextTest.php index bdbfd74..aba3f83 100644 --- a/core/modules/system/tests/src/Functional/Mail/HtmlToTextTest.php +++ b/core/modules/system/tests/src/Functional/Mail/HtmlToTextTest.php @@ -212,27 +212,29 @@ public function testDrupalHtmltoTextCollapsesWhitespace() { * (at least) a newline in the plaintext version. */ public function testDrupalHtmlToTextBlockTagToNewline() { - $input = '[text]' - . '
[blockquote]
' - . '
[br]' - . '
[dl-dt]
' - . '
[dt]
' - . '
[dd]
' - . '
[dd-dl]
' - . '

[h1]

' - . '

[h2]

' - . '

[h3]

' - . '

[h4]

' - . '
[h5]
' - . '
[h6]
' - . '
[hr]' - . '
  1. [ol-li]
  2. ' - . '
  3. [li]
  4. ' - . '
  5. [li-ol]
' - . '

[p]

' - . '' - . '[text]'; + $input = implode('', [ + '[text]', + '
[blockquote]
', + '
[br]', + '
[dl-dt]
', + '
[dt]
', + '
[dd]
', + '
[dd-dl]
', + '

[h1]

', + '

[h2]

', + '

[h3]

', + '

[h4]

', + '
[h5]
', + '
[h6]
', + '
[hr]', + '
  1. [ol-li]
  2. ', + '
  3. [li]
  4. ', + '
  5. [li-ol]
', + '

[p]

', + '', + '[text]', + ]); $output = MailFormatHelper::htmlToText($input); $pass = $this->assertFalse( preg_match('/\][^\n]*\[/s', $output), @@ -288,22 +290,26 @@ public function testHeaderSeparation() { */ public function testFootnoteReferences() { global $base_path, $base_url; - $source = 'Host and path' - . '
Host, no path' - . '
Path, no host' - . '
Relative path'; + $source = implode('', [ + 'Host and path', + '
Host, no path', + '
Path, no host', + '
Relative path', + ]); // @todo Footnote URLs should be absolute. - $tt = "Host and path [1]" - . "\nHost, no path [2]" + $tt = implode('', [ + "Host and path [1]", + "\nHost, no path [2]", // @todo The following two references should be combined. - . "\nPath, no host [3]" - . "\nRelative path [4]" - . "\n" - . "\n[1] http://www.example.com/node/1" - . "\n[2] http://www.example.com" + "\nPath, no host [3]", + "\nRelative path [4]", + "\n", + "\n[1] http://www.example.com/node/1", + "\n[2] http://www.example.com", // @todo The following two references should be combined. - . "\n[3] $base_url/node/1" - . "\n[4] node/1\n"; + "\n[3] $base_url/node/1", + "\n[4] node/1\n", + ]); $this->assertHtmlToText($source, $tt, 'Footnotes'); }