diff --git a/core/lib/Drupal/Component/Assertion/Handle.php b/core/lib/Drupal/Component/Assertion/Handle.php index 68c3a4e4ca..7e40d4d367 100644 --- a/core/lib/Drupal/Component/Assertion/Handle.php +++ b/core/lib/Drupal/Component/Assertion/Handle.php @@ -2,7 +2,7 @@ namespace Drupal\Component\Assertion; -@trigger_error('The ' . __NAMESPACE__ . '\Handle is deprecated in drupal:9.3.0 and is removed from drupal:10.0.0. Instead, use assert_options(ASSERT_EXCEPTION, TRUE). See https://drupal.org/node/3105918', E_USER_DEPRECATED); +@trigger_error( __NAMESPACE__ . '\Handle is deprecated in drupal:9.3.0 and is removed from drupal:10.0.0. Instead, use assert_options(ASSERT_EXCEPTION, TRUE). See https://drupal.org/node/3105918', E_USER_DEPRECATED); /** * Handler for runtime assertion failures. @@ -12,7 +12,7 @@ * @deprecated in drupal:9.3.0 and is removed from drupal:10.0.0. * Use assert_options(ASSERT_EXCEPTION, TRUE). * - * @see https://drupal.org/node/3105918 + * @see https://www.drupal.org/node/3105918 */ class Handle { diff --git a/core/tests/Drupal/Tests/Component/Assertion/HandleTest.php b/core/tests/Drupal/Tests/Component/Assertion/HandleTest.php index e69de29bb2..30785b802b 100644 --- a/core/tests/Drupal/Tests/Component/Assertion/HandleTest.php +++ b/core/tests/Drupal/Tests/Component/Assertion/HandleTest.php @@ -0,0 +1,33 @@ +expectDeprecation('Drupal\Component\Assertion\Handle is deprecated in drupal:9.3.0 and is removed from drupal:10.0.0. Instead, use assert_options(ASSERT_EXCEPTION, TRUE). See https://drupal.org/node/3105918'); + $this->getMockBuilder(Handle::class) + ->disableOriginalConstructor() + ->getMock(); + } + +}