'delete_translation' => 403,
'view_unpublished_translation' => 200,
'view_unpublished_translation_reference' => TRUE,
];
$this->
doTestWorkflows($this->administrator,
$expected_status);
// Check that translation permissions allow the associated operations.
$ops =
['create' => 'Add', 'update' => 'Edit', 'delete' => 'Delete'
];
$translations_url =
$this->entity->
toUrl('drupal:content-translation-overview'
);
foreach ($ops as $current_op =>
$item) { $user =
$this->
drupalCreateUser([ $this->
getTranslatePermission(),
"
$current_op content translations",
'view test entity',
]);
$this->
drupalLogin($user);
$this->
drupalGet($translations_url);
// Make sure that the user.permissions cache context and the cache tags
// for the entity are present.
$this->
assertCacheContext('user.permissions'
);
foreach ($this->entity->
getCacheTags() as $cache_tag) { $this->
assertSession()->
responseHeaderContains('X-Drupal-Cache-Tags',
$cache_tag);
}