You are here

function deprecation_test_function in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/system/tests/modules/deprecation_test/deprecation_test.module \deprecation_test_function()
  2. 9 core/modules/system/tests/modules/deprecation_test/deprecation_test.module \deprecation_test_function()

A deprecated function.

Return value

string A known return value of 'known_return_value'.

Deprecated

in drupal:8.4.0 and is removed from drupal:9.0.0. This is the deprecation message for deprecated_test_function().

See also

https://www.drupal.org/project/drupal/issues/2870194

2 calls to deprecation_test_function()
DeprecatedController::deprecatedMethod in core/modules/system/tests/modules/deprecation_test/src/DeprecatedController.php
Controller callback.
PhpUnitBridgeTest::testSilencedError in core/tests/Drupal/FunctionalTests/Core/Test/PhpUnitBridgeTest.php
Tests deprecation message from deprecation_test_function().

File

core/modules/system/tests/modules/deprecation_test/deprecation_test.module, line 19
Contains functions for testing calling deprecated functions in tests.

Code

function deprecation_test_function() {
  @trigger_error('This is the deprecation message for deprecation_test_function().', E_USER_DEPRECATED);
  return 'known_return_value';
}