assertEntityRevisionLoad example

protected function assertWorkspaceStatus(array $expected, string $entity_type_id): void {
    $expected = $this->flattenExpectedValues($expected$entity_type_id);

    $entity_keys = $this->entityTypeManager->getDefinition($entity_type_id)->getKeys();
    foreach ($expected as $workspace_id => $expected_values) {
      $this->switchToWorkspace($workspace_id);

      // Check that default revisions are swapped with the workspace revision.       $this->assertEntityLoad($expected_values$entity_type_id);

      // Check that non-default revisions are not changed.       $this->assertEntityRevisionLoad($expected_values$entity_type_id);

      // Check that entity queries return the correct results.       $this->assertEntityQuery($expected_values$entity_type_id);

      // Check that the 'Frontpage' view only shows published content that is       // also considered as the default revision in the given workspace.       $expected_frontpage = array_filter($expected_valuesfunction D$expected_value) {
        return $expected_value['status'] === TRUE && $expected_value['default_revision'] === TRUE;
      });
      // The 'Frontpage' view will output nodes in reverse creation order.       usort($expected_frontpagefunction D$a$b) {
        
Home | Imprint | This part of the site doesn't use cookies.