You are here

protected function AssertLegacyTrait::pass in Drupal 9

Same name and namespace in other branches
  1. 8 core/tests/Drupal/KernelTests/AssertLegacyTrait.php \Drupal\KernelTests\AssertLegacyTrait::pass()

Deprecated

in drupal:8.0.0 and is removed from drupal:10.0.0. PHPUnit interrupts a test as soon as a test assertion fails, so there is usually no need to call this method. If a test's logic relies on this method, refactor the test.

See also

\Drupal\simpletest\TestBase::pass()

https://www.drupal.org/node/3129738

1 call to AssertLegacyTrait::pass()
AssertLegacyTraitTest::testPass in core/tests/Drupal/Tests/Core/Assert/AssertLegacyTraitTest.php
@covers ::pass

File

core/tests/Drupal/KernelTests/AssertLegacyTrait.php, line 109

Class

AssertLegacyTrait
Translates Simpletest assertion methods to PHPUnit.

Namespace

Drupal\KernelTests

Code

protected function pass($message) {
  @trigger_error('AssertLegacyTrait::pass() is deprecated in drupal:8.0.0 and is removed from drupal:10.0.0. PHPUnit interrupts a test as soon as a test assertion fails, so there is usually no need to call this method. If a test\'s logic relies on this method, refactor the test. See https://www.drupal.org/node/3129738', E_USER_DEPRECATED);
  $this
    ->assertTrue(TRUE, $message);
}