public static function TestCompatibilityTrait::assertFalse in Drupal 8
Same name in this branch
- 8 core/tests/Drupal/TestTools/PhpUnitCompatibility/PhpUnit7/TestCompatibilityTrait.php \Drupal\TestTools\PhpUnitCompatibility\PhpUnit7\TestCompatibilityTrait::assertFalse()
- 8 core/tests/Drupal/TestTools/PhpUnitCompatibility/PhpUnit6/TestCompatibilityTrait.php \Drupal\TestTools\PhpUnitCompatibility\PhpUnit6\TestCompatibilityTrait::assertFalse()
@todo deprecate this method override in https://www.drupal.org/project/drupal/issues/2742585
See also
\Drupal\simpletest\TestBase::assertFalse()
File
- core/
tests/ Drupal/ TestTools/ PhpUnitCompatibility/ PhpUnit6/ TestCompatibilityTrait.php, line 32
Class
- TestCompatibilityTrait
- Makes Drupal's test API forward compatible with multiple versions of PHPUnit.
Namespace
Drupal\TestTools\PhpUnitCompatibility\PhpUnit6Code
public static function assertFalse($actual, $message = '') {
if (is_bool($actual)) {
parent::assertFalse($actual, $message);
}
else {
@trigger_error('Support for asserting against non-boolean values in ::assertFalse is deprecated in drupal:8.8.0 and is removed from drupal:9.0.0. Use a different assert method, for example, ::assertEmpty(). See https://www.drupal.org/node/3082086', E_USER_DEPRECATED);
parent::assertEmpty($actual, $message);
}
}