You are here

protected function AssertLegacyTrait::assert in Drupal 9

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

Deprecated

in drupal:8.0.0 and is removed from drupal:10.0.0. Use $this->assertTrue() instead.

See also

\Drupal\simpletest\TestBase::assert()

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

1 call to AssertLegacyTrait::assert()
KernelTestBaseTest::testAssert in core/tests/Drupal/KernelTests/KernelTestBaseTest.php
Tests the deprecation of AssertLegacyTrait::assert.

File

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

Class

AssertLegacyTrait
Translates Simpletest assertion methods to PHPUnit.

Namespace

Drupal\KernelTests

Code

protected function assert($actual, $message = '') {
  @trigger_error('AssertLegacyTrait::assert() is deprecated in drupal:8.0.0 and is removed from drupal:10.0.0. Use $this->assertTrue() instead. See https://www.drupal.org/node/3129738', E_USER_DEPRECATED);
  parent::assertTrue((bool) $actual, $message);
}