From 6a0d497e8b563e8dcd53412592c57b81a3c09b06 Mon Sep 17 00:00:00 2001 From: Alex Pott <alex.a.pott@googlemail.com> Date: Wed, 7 Jul 2021 16:58:42 +0100 Subject: [PATCH] Issue #3180382 by phenaproxima, dww, tedbow: UpdateManagerUpdate doesn't need to use the renderer service --- core/modules/update/src/Form/UpdateManagerUpdate.php | 5 +---- core/modules/update/tests/src/Functional/UpdateTestBase.php | 1 + 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/core/modules/update/src/Form/UpdateManagerUpdate.php b/core/modules/update/src/Form/UpdateManagerUpdate.php index 67a8827cbe1d..61b5d04b62c5 100644 --- a/core/modules/update/src/Form/UpdateManagerUpdate.php +++ b/core/modules/update/src/Form/UpdateManagerUpdate.php @@ -72,13 +72,10 @@ public static function create(ContainerInterface $container) { public function buildForm(array $form, FormStateInterface $form_state) { $this->moduleHandler->loadInclude('update', 'inc', 'update.manager'); - $last_markup = [ + $form['last_check'] = [ '#theme' => 'update_last_check', '#last' => $this->state->get('update.last_check', 0), ]; - $form['last_check'] = [ - '#markup' => \Drupal::service('renderer')->render($last_markup), - ]; if (!_update_manager_check_backends($form, 'update')) { return $form; diff --git a/core/modules/update/tests/src/Functional/UpdateTestBase.php b/core/modules/update/tests/src/Functional/UpdateTestBase.php index a1fde0dcad99..e7e6ed2f936c 100644 --- a/core/modules/update/tests/src/Functional/UpdateTestBase.php +++ b/core/modules/update/tests/src/Functional/UpdateTestBase.php @@ -110,6 +110,7 @@ protected function standardTests() { // Verify that the link to the Drupal project appears. $this->assertRaw(Link::fromTextAndUrl(t('Drupal'), Url::fromUri('http://example.com/project/drupal'))->toString()); $this->assertNoText('No available releases found'); + $this->assertSession()->pageTextContains('Last checked:'); } /** -- GitLab