Commit b37ec339 authored by catch's avatar catch
Browse files

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 8e2dbf00
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -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()) {
+5 −2
Original line number Diff line number Diff line
@@ -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) {