protected function AssertLegacyTrait::assertNoPattern in Drupal 9
Same name and namespace in other branches
- 8 core/tests/Drupal/FunctionalTests/AssertLegacyTrait.php \Drupal\FunctionalTests\AssertLegacyTrait::assertNoPattern()
Triggers a pass if the Perl regex pattern is not found in the raw content.
Parameters
string $pattern: Perl regex to look for including the regex delimiters.
Deprecated
in drupal:8.4.0 and is removed from drupal:10.0.0. Use $this->assertSession()->responseNotMatches() instead.
See also
https://www.drupal.org/node/3129738
1 call to AssertLegacyTrait::assertNoPattern()
- AssertLegacyTraitTest::testAssertNoPattern in core/
tests/ Drupal/ Tests/ Core/ Assert/ AssertLegacyTraitTest.php - @covers ::assertNoPattern
File
- core/
tests/ Drupal/ FunctionalTests/ AssertLegacyTrait.php, line 843
Class
- AssertLegacyTrait
- Provides convenience methods for assertions in browser tests.
Namespace
Drupal\FunctionalTestsCode
protected function assertNoPattern($pattern) {
@trigger_error('AssertLegacyTrait::assertNoPattern() is deprecated in drupal:8.4.0 and is removed from drupal:10.0.0. Use $this->assertSession()->responseNotMatches() instead. See https://www.drupal.org/node/3129738', E_USER_DEPRECATED);
$this
->assertSession()
->responseNotMatches($pattern);
}