function AssertLegacyTrait::pass

Same name and namespace in other branches
  1. 8.9.x 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);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.