diff -u b/core/tests/Drupal/KernelTests/Core/Asset/AttachedAssetsTest.php b/core/tests/Drupal/KernelTests/Core/Asset/AttachedAssetsTest.php --- b/core/tests/Drupal/KernelTests/Core/Asset/AttachedAssetsTest.php +++ b/core/tests/Drupal/KernelTests/Core/Asset/AttachedAssetsTest.php @@ -253,9 +253,9 @@ * * @group legacy * @see \Drupal\Core\Render\Element\HtmlTag::preRenderConditionalComments() - * @expectedDeprecation Support for IE Conditional Comments is deprecated in drupal:9.1.0 and is removed from drupal:10.0.0. See https://www.drupal.org/node/3102997 */ public function testBrowserConditionalComments() { + $this->expectDeprecation('Support for IE Conditional Comments is deprecated in drupal:9.1.0 and is removed from drupal:10.0.0. See https://www.drupal.org/node/3102997'); $default_query_string = $this->container->get('state')->get('system.css_js_query_string') ?: '0'; $build['#attached']['library'][] = 'common_test/browsers';