diff --git a/core/modules/system/src/Tests/Update/DbDumpTest.php b/core/modules/system/src/Tests/Update/DbDumpTest.php index ca1b043..9d96fac 100644 --- a/core/modules/system/src/Tests/Update/DbDumpTest.php +++ b/core/modules/system/src/Tests/Update/DbDumpTest.php @@ -177,6 +177,12 @@ public function testDbDumpCommand() { // The test data are in the dump (serialized). $pattern = preg_quote(serialize($this->data)); $this->assertTrue(preg_match('/' . $pattern . '/', $command_tester->getDisplay()), 'Generated data is found in the exported script.'); + + // Check that the user account name and email address was properly escaped. + $pattern = preg_quote('"q\'uote\$dollar@example.com"'); + $this->assertTrue(preg_match('/' . $pattern . '/', $command_tester->getDisplay()), 'The user account email address was properly escaped in the exported script.'); + $pattern = preg_quote('\'$dollar\''); + $this->assertTrue(preg_match('/' . $pattern . '/', $command_tester->getDisplay()), 'The user account name was properly escaped in the exported script.'); } /**