diff --git a/core/modules/image/src/Tests/ImageThemeFunctionTest.php b/core/modules/image/src/Tests/ImageThemeFunctionTest.php
index 64bfdf1..9da2893 100644
--- a/core/modules/image/src/Tests/ImageThemeFunctionTest.php
+++ b/core/modules/image/src/Tests/ImageThemeFunctionTest.php
@@ -158,4 +158,39 @@ function testImageStyleTheme() {
     $this->assertEqual(count($elements), 1, 'theme_image_style() renders an image correctly with a NULL value for the alt option.');
   }
 
+  /**
+   * Tests that alt in image's attributes is shown correctly.
+   */
+  function testImageAltFunctionality() {
+    $image_with_alt_working = array(
+      '#theme' => 'image',
+      '#uri' => '/core/themes/bartik/logo.png',
+      '#alt' => 'Regular alt',
+      '#title' => 'Test title',
+      '#width' => '50%',
+      '#height' => '50%',
+      '#attributes' => array('class' => 'image-with-regular-alt', 'id' => 'my-img'),
+    );
+
+    $this->drupalSetContent(drupal_render($image_with_alt_working));
+    $elements = $this->xpath('//img[contains(@class, class) and contains(@alt, :alt)]', array(":class" => "image-with-regular-alt", ":alt" => "Regular alt"));
+    $this->assertEqual(count($elements), 1, 'Regular alt displays correctly');
+
+    $image_with_alt_attribute_not_working = array(
+      '#theme' => 'image',
+      '#uri' => '/core/themes/bartik/logo.png',
+      '#width' => '50%',
+      '#height' => '50%',
+      '#attributes' => array(
+        'class' => 'image-with-attribute-alt',
+        'id' => 'my-img',
+        'title' => 'New test title',
+        'alt' => 'Attribute alt',
+      ),
+    );
+
+    $this->drupalSetContent(drupal_render($image_with_alt_attribute_not_working));
+    $elements = $this->xpath('//img[contains(@class, class) and contains(@alt, :alt)]', array(":class" => "image-with-attribute-alt", ":alt" => "Attribute alt"));
+    $this->assertEqual(count($elements), 1, 'Attribute alt displays correctly');
+  }
 }
