diff --git a/core/lib/Drupal/Core/Template/Attribute.php b/core/lib/Drupal/Core/Template/Attribute.php
index cebe699..6fa6c55 100644
--- a/core/lib/Drupal/Core/Template/Attribute.php
+++ b/core/lib/Drupal/Core/Template/Attribute.php
@@ -161,6 +161,18 @@ public function addClass() {
   }
 
   /**
+   * Checks if given class is in existing CSS classes
+   *
+   * @param string $class
+   *   CSS Class to check
+   *
+   * @return bool
+   */
+  public function hasClass($class) {
+    return in_array($class, $this->storage['class']->value());
+  }
+
+  /**
    * Removes argument values from array of existing CSS classes.
    *
    * @param string|array ...
diff --git a/core/tests/Drupal/Tests/Core/Template/AttributeTest.php b/core/tests/Drupal/Tests/Core/Template/AttributeTest.php
index b04eb51..701fc55 100644
--- a/core/tests/Drupal/Tests/Core/Template/AttributeTest.php
+++ b/core/tests/Drupal/Tests/Core/Template/AttributeTest.php
@@ -141,6 +141,19 @@ public function testRemoveClasses() {
   }
 
   /**
+   * Tests removing class attributes with the AttributeArray helper method.
+   * @covers ::hasClass()
+   */
+  public function testHasClass() {
+    // Add duplicate class to ensure that both duplicates are removed.
+    $classes = array('example-class', 'we-totally-have-this-class');
+    $attribute = new Attribute(array('class' => $classes));
+
+    $this->assertTrue($attribute->hasClass('we-totally-have-this-class'));
+    $this->assertFalse($attribute->hasClass('a-class-nowhere-to-be-found'));
+  }
+
+  /**
    * Tests removing class attributes with the Attribute helper methods.
    * @covers ::removeClass()
    * @covers ::addClass()
diff --git a/sites/default/default.services.yml b/sites/default/default.services.yml
old mode 100644
new mode 100755
diff --git a/sites/default/default.settings.php b/sites/default/default.settings.php
old mode 100644
new mode 100755
