Commit 01d91a57 authored by catch's avatar catch

Issue #3112916 by Sam152, ocelotkevin, corneboele, jantoine, yovince,...

Issue #3112916 by Sam152, ocelotkevin, corneboele, jantoine, yovince, bkosborne: Content Moderation views should join on entity ID

(cherry picked from commit 7a48898ffcc88da6d40d1d91f5086a4eeab13b11)
parent a91627dd
...@@ -35,6 +35,10 @@ public function ensureMyTable() { ...@@ -35,6 +35,10 @@ public function ensureMyTable() {
'field' => 'content_entity_type_id', 'field' => 'content_entity_type_id',
'value' => $left_entity_type->id(), 'value' => $left_entity_type->id(),
], ],
[
'field' => 'content_entity_id',
'left_field' => $left_entity_type->getKey('id'),
],
], ],
]; ];
if ($left_entity_type->isTranslatable()) { if ($left_entity_type->isTranslatable()) {
......
...@@ -297,8 +297,11 @@ protected function assertNodesWithFilters(array $nodes, array $filters, $view_id ...@@ -297,8 +297,11 @@ protected function assertNodesWithFilters(array $nodes, array $filters, $view_id
$this->assertEquals('vid', $configuration['left_field']); $this->assertEquals('vid', $configuration['left_field']);
$this->assertEquals('content_entity_type_id', $configuration['extra'][0]['field']); $this->assertEquals('content_entity_type_id', $configuration['extra'][0]['field']);
$this->assertEquals('node', $configuration['extra'][0]['value']); $this->assertEquals('node', $configuration['extra'][0]['value']);
$this->assertEquals('langcode', $configuration['extra'][1]['field']);
$this->assertEquals('langcode', $configuration['extra'][1]['left_field']); $this->assertEquals('content_entity_id', $configuration['extra'][1]['field']);
$this->assertEquals('nid', $configuration['extra'][1]['left_field']);
$this->assertEquals('langcode', $configuration['extra'][2]['field']);
$this->assertEquals('langcode', $configuration['extra'][2]['left_field']);
$expected_result = []; $expected_result = [];
foreach ($nodes as $node) { foreach ($nodes as $node) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment