diff --git a/core/modules/system/src/Tests/Theme/TwigEnvironmentTest.php b/core/modules/system/src/Tests/Theme/TwigEnvironmentTest.php
index 3f90e8d..0079b27 100644
--- a/core/modules/system/src/Tests/Theme/TwigEnvironmentTest.php
+++ b/core/modules/system/src/Tests/Theme/TwigEnvironmentTest.php
@@ -7,6 +7,7 @@
 
 namespace Drupal\system\Tests\Theme;
 
+use Drupal\Core\Site\Settings;
 use Drupal\simpletest\KernelTestBase;
 
 /**
@@ -40,6 +41,27 @@ public function testInlineTemplate() {
       '#context' => array('lama' => 'muuh'),
     );
     $this->assertEqual(drupal_render($element), 'test-with-context muuh');
+
+
+    // Enable twig_auto_reload and twig_debug.
+    $settings = Settings::getAll();
+    $settings['twig_debug'] = TRUE;
+    $settings['twig_auto_reload'] = TRUE;
+
+    new Settings($settings);
+    $this->container = $this->kernel->rebuildContainer();
+    \Drupal::setContainer($this->container);
+
+    $element = array();
+    $element['test'] = array(
+      '#type' => 'inline_template',
+      '#template' => 'test-with-context {{ lama }}',
+      '#context' => array('lama' => 'muuh'),
+    );
+    $element_copy = $element;
+    // Ensure to call it twice that twig caching is triggered.
+    $this->assertEqual(drupal_render($element), 'test-with-context muuh');
+    $this->assertEqual(drupal_render($element_copy), 'test-with-context muuh');
   }
 
 }
diff --git a/core/modules/system/src/Tests/Theme/TwigSettingsTest.php b/core/modules/system/src/Tests/Theme/TwigSettingsTest.php
index e570432..75231ac 100644
--- a/core/modules/system/src/Tests/Theme/TwigSettingsTest.php
+++ b/core/modules/system/src/Tests/Theme/TwigSettingsTest.php
@@ -118,4 +118,20 @@ function testTwigCacheOverride() {
     $this->assertFalse($new_cache_filename, 'Twig environment does not return cache filename after caching is disabled.');
   }
 
+  /**
+   * Tests twig inline templates with autoreload.
+   */
+  public function testTwigInlineWithAutoreload() {
+    $parameters = $this->container->getParameter('twig.config');
+    $parameters['auto_reload'] = TRUE;
+    $parameters['debug'] = TRUE;
+    $this->setContainerParameter('twig.config', $parameters);
+    $this->rebuildContainer();
+
+    $this->drupalGet('theme-test/inline-template-test');
+    $this->assertResponse(200);
+    $this->drupalGet('theme-test/inline-template-test');
+    $this->assertResponse(200);
+  }
+
 }
diff --git a/core/modules/system/tests/modules/theme_test/src/ThemeTestController.php b/core/modules/system/tests/modules/theme_test/src/ThemeTestController.php
index bf0e436..4e0c0a8 100644
--- a/core/modules/system/tests/modules/theme_test/src/ThemeTestController.php
+++ b/core/modules/system/tests/modules/theme_test/src/ThemeTestController.php
@@ -60,6 +60,22 @@ public function testTemplate() {
   }
 
   /**
+   * Tests the inline template functionality.
+   *
+   * @return array
+   *   A render array containing an inline template.
+   */
+  public function testInlineTemplate() {
+    $element = array();
+    $element['test'] = array(
+      '#type' => 'inline_template',
+      '#template' => 'test-with-context {{ lama }}',
+      '#context' => array('lama' => 'muuh'),
+    );
+    return $element;
+  }
+
+  /**
    * Calls a theme hook suggestion.
    *
    * @return string
diff --git a/core/modules/system/tests/modules/theme_test/theme_test.routing.yml b/core/modules/system/tests/modules/theme_test/theme_test.routing.yml
index f46f05b..d7d306e 100644
--- a/core/modules/system/tests/modules/theme_test/theme_test.routing.yml
+++ b/core/modules/system/tests/modules/theme_test/theme_test.routing.yml
@@ -21,6 +21,13 @@ theme_test.template_test:
   requirements:
     _access: 'TRUE'
 
+theme_test.inline_template_test:
+  path: '/theme-test/inline-template-test'
+  defaults:
+    _content: '\Drupal\theme_test\ThemeTestController::testInlineTemplate'
+  requirements:
+    _access: 'TRUE'
+
 theme_test.suggestion:
   path: '/theme-test/suggestion'
   options:
