diff --git a/core/modules/content_moderation/tests/src/Kernel/ViewsDataIntegrationTest.php b/core/modules/content_moderation/tests/src/Kernel/ViewsDataIntegrationTest.php index aac298c..8703d1f 100644 --- a/core/modules/content_moderation/tests/src/Kernel/ViewsDataIntegrationTest.php +++ b/core/modules/content_moderation/tests/src/Kernel/ViewsDataIntegrationTest.php @@ -50,11 +50,6 @@ protected function setUp($import_test_views = TRUE) { $workflow->getTypePlugin()->addEntityTypeAndBundle('node', 'page'); $workflow->getTypePlugin()->addEntityTypeAndBundle('entity_test_mulrevpub', 'entity_test_mulrevpub'); $workflow->save(); - - // Create a totally unrelated entity to ensure the extra join information - // joins by the correct entity type. - $entity = EntityTestMulRevPub::create([]); - $entity->save(); } /** @@ -70,6 +65,15 @@ public function testViewsData() { $node->moderation_state->value = 'published'; $node->save(); + // Create a totally unrelated entity to ensure the extra join information + // joins by the correct entity type. + $unrelated_entity = EntityTestMulRevPub::create([ + 'id' => $node->id(), + ]); + $unrelated_entity->save(); + + $this->assertEquals($unrelated_entity->id(), $node->id()); + $revision = clone $node; $revision->setNewRevision(TRUE); $revision->isDefaultRevision(FALSE);