diff --git a/core/modules/image/lib/Drupal/image/Tests/ImageThemeFunctionTest.php b/core/modules/image/lib/Drupal/image/Tests/ImageThemeFunctionTest.php
index 1f00c2187af7dd8f53b6a7613ddd3f4c527e6f2e..f4c5d13cf023adee1f141b57ddbf23b2ea70ad0a 100644
--- a/core/modules/image/lib/Drupal/image/Tests/ImageThemeFunctionTest.php
+++ b/core/modules/image/lib/Drupal/image/Tests/ImageThemeFunctionTest.php
@@ -93,7 +93,6 @@ function testImageStyleTheme() {
     $style->save();
     $url = $style->buildUrl($original_uri);
 
-    $path = $this->randomName();
     $element = array(
       '#theme' => 'image_style',
       '#style_name' => 'image_test',