Skip to content

Commit

Permalink
Issue #3112916 by Sam152, ocelotkevin, corneboele, jantoine, yovince,…
Browse files Browse the repository at this point in the history
… bkosborne: Content Moderation views should join on entity ID

(cherry picked from commit 7a48898ffcc88da6d40d1d91f5086a4eeab13b11)
  • Loading branch information
catch committed Jul 14, 2020
1 parent 25d43aa commit a16e0d7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ public function ensureMyTable() {
'field' => 'content_entity_type_id',
'value' => $left_entity_type->id(),
],
[
'field' => 'content_entity_id',
'left_field' => $left_entity_type->getKey('id'),
],
],
];
if ($left_entity_type->isTranslatable()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -297,8 +297,11 @@ protected function assertNodesWithFilters(array $nodes, array $filters, $view_id
$this->assertEquals('vid', $configuration['left_field']);
$this->assertEquals('content_entity_type_id', $configuration['extra'][0]['field']);
$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 = [];
foreach ($nodes as $node) {
Expand Down

0 comments on commit a16e0d7

Please sign in to comment.