You are here

protected function AssertLegacyTrait::assertNoPattern in Drupal 8

Same name and namespace in other branches
  1. 9 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 @expectedDeprecation 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

File

core/tests/Drupal/FunctionalTests/AssertLegacyTrait.php, line 702

Class

AssertLegacyTrait
Provides convenience methods for assertions in browser tests.

Namespace

Drupal\FunctionalTests

Code

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);
}