Commit 62ef2b44 authored by catch's avatar catch
Browse files

Issue #3217711 by Spokje, sudiptadas19, guilhermevp, mondrake: Replace usages...

Issue #3217711 by Spokje, sudiptadas19, guilhermevp, mondrake: Replace usages of assertNotRegExp(), that is deprecated
parent 36a43036
......@@ -136,7 +136,7 @@ public function testRequiredFields() {
else {
if (!empty($form_output)) {
// Make sure the form element is *not* marked as required.
$this->assertNotRegExp($required_marker_preg, (string) $form_output, "Optional '$type' field is not marked as required");
$this->assertDoesNotMatchRegularExpression($required_marker_preg, (string) $form_output, "Optional '$type' field is not marked as required");
}
if ($type == 'select') {
// Select elements are going to have validation errors with empty
......
......@@ -234,7 +234,7 @@ public function testDrupalHtmlToTextBlockTagToNewline() {
EOT;
$input = str_replace(["\r", "\n"], '', $input);
$output = MailFormatHelper::htmlToText($input);
$this->assertNotRegExp('/\][^\n]*\[/s', $output, 'Block-level HTML tags should force newlines');
$this->assertDoesNotMatchRegularExpression('/\][^\n]*\[/s', $output, 'Block-level HTML tags should force newlines');
$output_upper = mb_strtoupper($output);
$upper_input = mb_strtoupper($input);
$upper_output = MailFormatHelper::htmlToText($upper_input);
......
......@@ -759,7 +759,7 @@ protected function assertNoPattern($pattern, $message = '', $group = 'Other') {
if (!$message) {
$message = new FormattableMarkup('Pattern "@pattern" not found', ['@pattern' => $pattern]);
}
$this->assertNotRegExp($pattern, $this->getRawContent(), $message);
$this->assertDoesNotMatchRegularExpression($pattern, $this->getRawContent(), $message);
return TRUE;
}
......
......@@ -157,7 +157,7 @@ public function testDbDumpCommand() {
// Tables that are schema-only should not have data exported.
$pattern = preg_quote("\$connection->insert('sessions')");
$this->assertNotRegExp('/' . $pattern . '/', $command_tester->getDisplay(), 'Tables defined as schema-only do not have data exported to the script.');
$this->assertDoesNotMatchRegularExpression('/' . $pattern . '/', $command_tester->getDisplay(), 'Tables defined as schema-only do not have data exported to the script.');
// Table data is exported.
$pattern = preg_quote("\$connection->insert('config')");
......
......@@ -116,7 +116,7 @@ public function testMixedCaseConfigCleanupPackages() {
$plugin_config = $ref_plugin_config->invoke($config);
foreach (array_keys($plugin_config) as $package_name) {
$this->assertNotRegExp('/[A-Z]/', $package_name);
$this->assertDoesNotMatchRegularExpression('/[A-Z]/', $package_name);
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment