diff --git a/core/modules/responsive_image/src/Tests/ResponsiveImageFieldDisplayTest.php b/core/modules/responsive_image/src/Tests/ResponsiveImageFieldDisplayTest.php
index 952a0a6..ba53c42 100644
--- a/core/modules/responsive_image/src/Tests/ResponsiveImageFieldDisplayTest.php
+++ b/core/modules/responsive_image/src/Tests/ResponsiveImageFieldDisplayTest.php
@@ -135,6 +135,23 @@ public function _testResponsiveImageFieldFormatters($scheme) {
     $default_output = str_replace("\n", NULL, drupal_render($image));
     $this->assertRaw($default_output, 'Default formatter displaying correctly on full node view.');
 
+
+    // Test with a NULL value for the alt option.
+    $image['#alt'] = NULL;
+    $rendered_image = render($image);
+    debug($rendered_image);
+    $expected_result = '<img class="image-style-test" src="' . $image_uri . '" />';
+    $this->assertTrue(strpos($rendered_image, $expected_result) !== FALSE, 'img element correctly renders with a NULL value for the alt option.');
+    $this->assertTrue(strpos($rendered_image, '<picture>') !== FALSE, 'picture element correctly renders with a NULL value for the alt option.');
+
+    // Test without passing a value for the alt option.
+    unset($image['#alt']);
+    $rendered_image = render($image);
+    debug($rendered_image);
+    $expected_result = '<img class="image-style-test" src="' . $image_uri . '" alt="" />';
+    $this->assertTrue(strpos($rendered_image, $expected_result) !== FALSE, 'img element correctly renders the alt option.');
+    $this->assertTrue(strpos($rendered_image, '<picture alt="">') !== FALSE, 'picture element correctly renders the alt option.');
+
     // Use the responsive image formatter linked to file formatter.
     $display_options = array(
       'type' => 'responsive_image',
