Issue #3217711 by Spokje, sudiptadas19, guilhermevp, mondrake: Replace usages of assertNotRegExp(), that is deprecated
parent
bfe59b21ee
commit
50981069aa
|
@ -136,7 +136,7 @@ class FormTest extends BrowserTestBase {
|
|||
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 @@ class HtmlToTextTest extends BrowserTestBase {
|
|||
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 @@ trait AssertContentTrait {
|
|||
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 @@ class DbDumpTest extends KernelTestBase {
|
|||
|
||||
// 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 @@ class ConfigTest extends TestCase {
|
|||
$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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -126,7 +126,6 @@ trait DeprecationListenerTrait {
|
|||
// PHPUnit 9.
|
||||
"The \"PHPUnit\TextUI\DefaultResultPrinter\" class is considered internal This class is not covered by the backward compatibility promise for PHPUnit. It may change without further notice. You should not use it from \"Drupal\Tests\Listeners\HtmlOutputPrinter\".",
|
||||
'assertFileNotExists() is deprecated and will be removed in PHPUnit 10. Refactor your code to use assertFileDoesNotExist() instead.',
|
||||
'assertNotRegExp() is deprecated and will be removed in PHPUnit 10. Refactor your code to use assertDoesNotMatchRegularExpression() instead.',
|
||||
'Support for using expectException() with PHPUnit\\Framework\\Error\\Warning is deprecated and will be removed in PHPUnit 10. Use expectWarning() instead.',
|
||||
'Support for using expectException() with PHPUnit\\Framework\\Error\\Error is deprecated and will be removed in PHPUnit 10. Use expectError() instead.',
|
||||
'assertFileNotIsWritable() is deprecated and will be removed in PHPUnit 10. Refactor your code to use assertFileIsNotWritable() instead.',
|
||||
|
|
Loading…
Reference in New Issue