diff --git a/core/modules/simpletest/src/Form/SimpletestTestForm.php b/core/modules/simpletest/src/Form/SimpletestTestForm.php
index f6d0367..aadc4a9 100644
--- a/core/modules/simpletest/src/Form/SimpletestTestForm.php
+++ b/core/modules/simpletest/src/Form/SimpletestTestForm.php
@@ -127,8 +127,8 @@ public function buildForm(array $form, FormStateInterface $form_state) {
       '#suffix' => '<a href="#" class="simpletest-collapse">(' . $this->t('Collapse') . ')</a>',
     );
     $form['tests']['#attached']['drupalSettings']['simpleTest']['images'] = [
-      $this->renderer->renderPlain($image_collapsed),
-      $this->renderer->renderPlain($image_extended),
+      (string) $this->renderer->renderPlain($image_collapsed),
+      (string) $this->renderer->renderPlain($image_extended),
     ];
 
     // Generate the list of tests arranged by group.
diff --git a/core/modules/simpletest/src/Tests/SimpleTestBrowserTest.php b/core/modules/simpletest/src/Tests/SimpleTestBrowserTest.php
index 956d677..574da77 100644
--- a/core/modules/simpletest/src/Tests/SimpleTestBrowserTest.php
+++ b/core/modules/simpletest/src/Tests/SimpleTestBrowserTest.php
@@ -124,6 +124,8 @@ public function testUserAgentValidation() {
    * Tests that PHPUnit and KernelTestBase tests work through the UI.
    */
   public function testTestingThroughUI() {
+    $this->drupalGet('admin/config/development/testing');
+    $this->assertTrue(strpos($this->drupalSettings['simpleTest']['images'][0], 'core/misc/menu-collapsed.png') > 0, 'drupalSettings contains a link to core/misc/menu-collapsed.png.');
     // We can not test WebTestBase tests here since they require a valid .htkey
     // to be created. However this scenario is covered by the testception of
     // \Drupal\simpletest\Tests\SimpleTestTest.
