diff --git a/core/lib/Drupal/Core/Theme/ThemeManager.php b/core/lib/Drupal/Core/Theme/ThemeManager.php
index 4de3808..a270da2 100644
--- a/core/lib/Drupal/Core/Theme/ThemeManager.php
+++ b/core/lib/Drupal/Core/Theme/ThemeManager.php
@@ -153,7 +153,7 @@ public function render($hook, array $variables) {
     $original_hook = $hook;
 
     // If there's no implementation, check for more generic fallbacks.
-    // If there's still no implementation, log an error and return an empty
+    // If there's still no implementation, trigger an error and return an empty
     // string.
     if (!$theme_registry->has($hook)) {
       // Iteratively strip everything after the last '__' delimiter, until an
@@ -165,10 +165,10 @@ public function render($hook, array $variables) {
         }
       }
       if (!$theme_registry->has($hook)) {
-        // Only log a message when not trying theme suggestions ($hook being an
-        // array).
+        // Only trigger an error when not trying theme suggestions ($hook being
+        // an array).
         if (!isset($candidate)) {
-          \Drupal::logger('theme')->warning('Theme hook %hook not found.', array('%hook' => $hook));
+          trigger_error(sprintf("Unknown theme hook '%s'.", $original_hook), E_USER_ERROR);
         }
         // There is no theme implementation for the hook passed. Return FALSE so
         // the function calling
@@ -313,6 +313,9 @@ public function render($hook, array $variables) {
         // has been written correctly and that the markup is safe.
         $output = Markup::create($info['function']($variables));
       }
+      else {
+        trigger_error(sprintf("Missing theme function '%s' for theme hook '%s'.", $info['function'], $hook), E_USER_ERROR);
+      }
     }
     else {
       $render_function = 'twig_render_template';
diff --git a/core/modules/aggregator/src/Tests/AggregatorTitleTest.php b/core/modules/aggregator/src/Tests/AggregatorTitleTest.php
index d599d9a..da4d79d 100644
--- a/core/modules/aggregator/src/Tests/AggregatorTitleTest.php
+++ b/core/modules/aggregator/src/Tests/AggregatorTitleTest.php
@@ -24,7 +24,7 @@ class AggregatorTitleTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['file', 'field', 'options', 'aggregator'];
+  public static $modules = ['file', 'field', 'options', 'aggregator', 'system'];
 
   /**
    * The field name that is tested.
@@ -74,7 +74,7 @@ public function testStringFormatter() {
 
     $build = $aggregator_feed->{$this->fieldName}->view(['type' => 'aggregator_title', 'settings' => ['display_as_link' => FALSE]]);
     $result = $this->render($build);
-    $this->assertTrue(strpos($result, 'testing title') === 0);
+    $this->assertTrue(preg_match('/testing title/', $result));
     $this->assertTrue(strpos($result, $aggregator_feed->getUrl()) === FALSE);
 
     // Verify aggregator item title with and without links.
@@ -85,8 +85,8 @@ public function testStringFormatter() {
     $this->assertTrue(strpos($result, 'href="' . $aggregator_item->getLink()) . '"');
 
     $build = $aggregator_item->{$this->fieldName}->view(['type' => 'aggregator_title', 'settings' => ['display_as_link' => FALSE]]);
-    $result = $this->render($build);
-    $this->assertTrue(strpos($result, 'test title') === 0);
+    $result = strip_tags($this->render($build));
+    $this->assertTrue(preg_match('/test title/', $result));
     $this->assertTrue(strpos($result, $aggregator_item->getLink()) === FALSE);
   }
 
diff --git a/core/modules/field/src/Tests/Boolean/BooleanFormatterTest.php b/core/modules/field/src/Tests/Boolean/BooleanFormatterTest.php
index 214590d..a2ff305 100644
--- a/core/modules/field/src/Tests/Boolean/BooleanFormatterTest.php
+++ b/core/modules/field/src/Tests/Boolean/BooleanFormatterTest.php
@@ -27,7 +27,7 @@ class BooleanFormatterTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['field', 'text', 'entity_test', 'user'];
+  public static $modules = ['field', 'text', 'entity_test', 'user', 'system'];
 
   /**
    * @var string
diff --git a/core/modules/node/src/Tests/NodeListBuilderTest.php b/core/modules/node/src/Tests/NodeListBuilderTest.php
index 2d23604..e4a0d35 100644
--- a/core/modules/node/src/Tests/NodeListBuilderTest.php
+++ b/core/modules/node/src/Tests/NodeListBuilderTest.php
@@ -20,7 +20,7 @@ class NodeListBuilderTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['node', 'user'];
+  public static $modules = ['node', 'user', 'system'];
 
   protected function setUp() {
     parent::setUp();
