diff --git a/tests/src/Kernel/Processor/RenderedItemTest.php b/tests/src/Kernel/Processor/RenderedItemTest.php
index 366e16be..1ea60728 100644
--- a/tests/src/Kernel/Processor/RenderedItemTest.php
+++ b/tests/src/Kernel/Processor/RenderedItemTest.php
@@ -2,14 +2,21 @@
 
 namespace Drupal\Tests\search_api\Kernel\Processor;
 
+use Drupal\comment\CommentInterface;
+use Drupal\comment\Entity\Comment;
+use Drupal\comment\Entity\CommentType;
 use Drupal\Core\Entity\Entity\EntityViewMode;
 use Drupal\Core\TypedData\DataDefinitionInterface;
+use Drupal\field\Entity\FieldConfig;
+use Drupal\field\Entity\FieldStorageConfig;
 use Drupal\node\Entity\Node;
 use Drupal\node\Entity\NodeType;
+use Drupal\node\NodeInterface;
 use Drupal\search_api\Entity\Index;
+use Drupal\search_api\Item\ItemInterface;
 use Drupal\search_api\Utility\Utility;
-use Drupal\user\Entity\Role;
 use Drupal\user\Entity\User;
+use Drupal\user\UserInterface;
 
 /**
  * Tests the "Rendered item" processor.
@@ -49,24 +56,35 @@ public function setUp($processor = NULL) {
 
     // Load additional configuration and needed schemas. (The necessary schemas
     // for using nodes are already installed by the parent method.)
-    $this->installConfig(array('system', 'filter', 'node', 'comment'));
+    $this->installConfig(array('system', 'filter', 'node', 'comment', 'user'));
     $this->installSchema('system', array('router'));
     \Drupal::service('router.builder')->rebuild();
 
-    // Create a node type for testing.
-    $type = NodeType::create(array(
-      'type' => 'page',
-      'name' => 'page',
-    ));
-    $type->save();
-    node_add_body_field($type);
-
-    // Create anonymous user role.
-    $role = Role::create(array(
-      'id' => 'anonymous',
-      'label' => 'anonymous',
-    ));
-    $role->save();
+    // Creates node types for testing.
+    foreach (['article', 'page'] as $type_id) {
+      $type = NodeType::create(array(
+        'type' => $type_id,
+        'name' => $type_id,
+      ));
+      $type->save();
+      node_add_body_field($type);
+    }
+    CommentType::create([
+      'id' => 'comment',
+      'label' => 'comment',
+      'target_entity_type_id' => 'node',
+    ])->save();
+    FieldStorageConfig::create([
+      'field_name' => 'comment',
+      'type' => 'comment',
+      'entity_type' => 'node',
+    ])->save();
+    FieldConfig::create([
+      'field_name' => 'comment',
+      'entity_type' => 'node',
+      'bundle' => 'page',
+      'label' => 'Comments',
+    ])->save();
 
     // Insert the anonymous user into the database.
     $anonymous_user = User::create(array(
@@ -95,20 +113,26 @@ public function setUp($processor = NULL) {
     $node_data['body']['summary'] = 'summary for node 2';
     $this->nodes[2] = Node::create($node_data);
     $this->nodes[2]->save();
+    $node_data['type'] = 'article';
+    $node_data['title'] = 'Title for node 3';
+    $node_data['body']['value'] = 'value for node 3';
+    $node_data['body']['summary'] = 'summary for node 3';
+    $this->nodes[3] = Node::create($node_data);
+    $this->nodes[3]->save();
 
     // Add a field based on the "rendered_item" property.
     $field_info = array(
       'type' => 'text',
       'property_path' => 'rendered_item',
       'configuration' => array(
-        'roles' => array($role->id()),
+        'roles' => array('anonymous'),
         'view_mode' => array(
           'entity:node' => array(
             'page' => 'full',
             'article' => 'teaser',
           ),
           'entity:user' => array(
-            'user' => 'default',
+            'user' => 'compact',
           ),
           'entity:comment' => array(
             'comment' => 'full',
@@ -119,9 +143,10 @@ public function setUp($processor = NULL) {
     $field = Utility::createField($this->index, 'rendered_item', $field_info);
     $this->index->addField($field);
 
+    $this->index->setDatasources($this->index->createPlugins('datasource'));
+
     $this->index->save();
 
-    $this->index->getDatasources();
 
     // Enable the classy and stable themes as the tests rely on markup from
     // that. Set stable as the active theme, but make classy the default. The
@@ -145,6 +170,29 @@ public function testAddFieldValues() {
         'text' => 'node text' . $node->id(),
       );
     }
+    $user = User::create([
+      'uid' => 2,
+      'name' => 'User #2',
+    ]);
+    $items[] = [
+      'datasource' => 'entity:user',
+      'item' => $user->getTypedData(),
+      'item_id' => $user->id(),
+    ];
+    $comment = Comment::create([
+      'entity_type' => 'node',
+      'entity_id' => 1,
+      'field_name' => 'comment',
+      'cid' => 1,
+      'comment_type' => 'comment',
+      'subject' => 'Subject of comment 1',
+    ]);
+    $comment->save();
+    $items[] = [
+      'datasource' => 'entity:comment',
+      'item' => $comment->getTypedData(),
+      'item_id' => $comment->id(),
+    ];
     $items = $this->generateItems($items);
 
     // Add the processor's field values to the items.
@@ -153,31 +201,96 @@ public function testAddFieldValues() {
     }
 
     foreach ($items as $key => $item) {
-      list(, $nid) = Utility::splitCombinedId($key);
+      list($datasource_id, $entity_id) = Utility::splitCombinedId($key);
+      $type = $this->index->getDatasource($datasource_id)->label();
+
       $field = $item->getField('rendered_item');
-      $this->assertEquals('text', $field->getType(), 'Node item ' . $nid . ' rendered value is identified as text.');
+      $this->assertEquals('text', $field->getType(), "$type item $entity_id rendered value is identified as text.");
       /** @var \Drupal\search_api\Plugin\search_api\data_type\value\TextValueInterface[] $values */
       $values = $field->getValues();
       // Test that the value is properly wrapped in a
       // \Drupal\search_api\Plugin\search_api\data_type\value\TextValueInterface
       // object, which contains a string (not, for example, some markup object).
-      $this->assertInstanceOf('Drupal\search_api\Plugin\search_api\data_type\value\TextValueInterface', $values[0], "Node item $nid rendered value is properly wrapped in a text value object.");
-      $this->assertInternalType('string', $values[0]->getText(), "Node item $nid rendered value is a string.");
-      $this->assertEquals(1, count($values), 'Node item ' . $nid . ' rendered value is a single value.');
-      // These tests rely on the template not changing. However, if we'd only
-      // check whether the field values themselves are included, there could
-      // easier be false positives. For example, the title text was present even
-      // when the processor was broken, because the schema metadata was also
-      // adding it to the output.
-      $this->assertTrue(substr_count($values[0], 'view-mode-full') > 0, 'Node item ' . $nid . ' rendered in view-mode "full".');
-      $this->assertTrue(substr_count($values[0], 'field--name-title') > 0, 'Node item ' . $nid . ' has a rendered title field.');
-      $this->assertTrue(substr_count($values[0], '>' . $this->nodes[$nid]->label() . '<') > 0, 'Node item ' . $nid . ' has a rendered title inside HTML-Tags.');
-      $this->assertTrue(substr_count($values[0], '>Member for<') > 0, 'Node item ' . $nid . ' has rendered member information HTML-Tags.');
-      $this->assertTrue(substr_count($values[0], '>' . $this->nodes[$nid]->get('body')->getValue()[0]['value'] . '<') > 0, 'Node item ' . $nid . ' has rendered content inside HTML-Tags.');
+      $this->assertInstanceOf('Drupal\search_api\Plugin\search_api\data_type\value\TextValueInterface', $values[0], "$type item $entity_id rendered value is properly wrapped in a text value object.");
+      $field_value = $values[0]->getText();
+      $this->assertInternalType('string', $field_value, "$type item $entity_id rendered value is a string.");
+      $this->assertEquals(1, count($values), "$type item $entity_id rendered value is a single value.");
+
+      switch ($datasource_id) {
+        case 'entity:node':
+          $this->checkRenderedNode($this->nodes[$entity_id], $field_value);
+          break;
+
+        case 'entity:user':
+          $this->checkRenderedUser($user, $field_value);
+          break;
+
+        case 'entity:comment':
+          $this->checkRenderedComment($comment, $field_value);
+          break;
+
+        default:
+          $this->assertTrue(FALSE);
+      }
+
     }
   }
 
   /**
+   * Verifies that a certain node has been rendered correctly.
+   *
+   * @param \Drupal\node\NodeInterface $node
+   *   The node.
+   * @param string $field_value
+   *   The rendered field value.
+   */
+  protected function checkRenderedNode(NodeInterface $node, $field_value) {
+    // These tests rely on the template not changing. However, if we'd only
+    // check whether the field values themselves are included, there could
+    // easier be false positives. For example, the title text was present even
+    // when the processor was broken, because the schema metadata was also
+    // adding it to the output.
+    $nid = $node->id();
+    $full_view = $node->bundle() === 'page';
+    $view_mode = $full_view ? 'full' : 'teaser';
+    $this->assertContains("view-mode-$view_mode", $field_value, 'Node item ' . $nid . " rendered in view-mode \"$view_mode\".");
+    $this->assertContains('field--name-title', $field_value, 'Node item ' . $nid . ' has a rendered title field.');
+    $this->assertContains('>' . $node->label() . '<', $field_value, 'Node item ' . $nid . ' has a rendered title inside HTML-Tags.');
+    $this->assertContains('>Member for<', $field_value, 'Node item ' . $nid . ' has rendered member information HTML-Tags.');
+    if ($full_view) {
+      $body_value = $node->get('body')->getValue()[0]['value'] . '<';
+    }
+    else {
+      $body_value = $node->get('body')->getValue()[0]['summary'] . '<';
+    }
+    $this->assertContains('>' . $body_value, $field_value, 'Node item ' . $nid . ' has rendered content inside HTML-Tags.');
+  }
+
+  /**
+   * Verifies that a certain user has been rendered correctly.
+   *
+   * @param \Drupal\user\UserInterface $user
+   *   The user.
+   * @param string $field_value
+   *   The rendered field value.
+   */
+  protected function checkRenderedUser(UserInterface $user, $field_value) {
+    $this->assertContains('>Member for<', $field_value);
+  }
+
+  /**
+   * Verifies that a certain comment has been rendered correctly.
+   *
+   * @param \Drupal\comment\CommentInterface $comment
+   *   The comment.
+   * @param string $field_value
+   *   The rendered field value.
+   */
+  protected function checkRenderedComment(CommentInterface $comment, $field_value) {
+    $this->assertContains('>' . $comment->label() . '<', $field_value);
+  }
+
+  /**
    * Tests that hiding a rendered item works.
    */
   public function testHideRenderedItem() {
@@ -242,6 +355,7 @@ public function testDependencyRemoval() {
         'core.entity_view_mode.comment.full',
         'core.entity_view_mode.node.full',
         'core.entity_view_mode.node.teaser',
+        'core.entity_view_mode.user.compact',
       ),
     );
     $this->assertEquals($expected, $this->processor->calculateDependencies());
@@ -252,7 +366,7 @@ public function testDependencyRemoval() {
         'page' => 'full',
       ),
       'entity:user' => array(
-        'user' => 'default',
+        'user' => 'compact',
       ),
       'entity:comment' => array(
         'comment' => 'full',
