diff -u b/tests/src/Functional/BlockFieldTest.php b/tests/src/Functional/BlockFieldTest.php --- b/tests/src/Functional/BlockFieldTest.php +++ b/tests/src/Functional/BlockFieldTest.php @@ -161,8 +161,10 @@ $assert->responseMatches('/\d\d:\d\d:\d\d \(\d+\)/'); $assert->responseNotContains($time); - // Use the Block Field Label formatter for the field_block_field_test display. - entity_get_display('node', 'block_field_test', 'default') + // Use the Block Field Label formatter for the field_block_field_test + // display. + \Drupal::service('entity_display.repository') + ->getViewDisplay('node', 'block_field_test', 'default') ->setComponent('field_block_field_test', [ 'type' => 'block_field_label', ])