diff --git a/core/modules/system/lib/Drupal/system/Tests/Common/AttributesUnitTest.php b/core/modules/system/lib/Drupal/system/Tests/Common/AttributesUnitTest.php
index 894e0ab..6910f7a 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Common/AttributesUnitTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Common/AttributesUnitTest.php
@@ -47,5 +47,11 @@ function testDrupalAttributes() {
 
     // Verify empty attributes array is rendered.
     $this->assertIdentical((string) new Attribute(array()), '', 'Empty attributes array.');
+
+    $attributes_array = array('key1' => 'value1');
+    $attribute = new Attribute($attributes_array);
+    foreach($attribute as $value) {
+      $this->assertIdentical((string) $value, 'value1', 'Iterate over attribute.');
+    }
   }
 }
