function RevisionVersionHistoryTest::testDescriptionLinkNoAccess
Same name in other branches
- 10 core/tests/Drupal/FunctionalTests/Entity/RevisionVersionHistoryTest.php \Drupal\FunctionalTests\Entity\RevisionVersionHistoryTest::testDescriptionLinkNoAccess()
Test revision link, without access to revision page.
@covers ::getRevisionDescription
File
-
core/
tests/ Drupal/ FunctionalTests/ Entity/ RevisionVersionHistoryTest.php, line 173
Class
- RevisionVersionHistoryTest
- Tests version history page.
Namespace
Drupal\FunctionalTests\EntityCode
public function testDescriptionLinkNoAccess() : void {
/** @var \Drupal\entity_test_revlog\Entity\EntityTestWithRevisionLog $entity */
$entity = EntityTestWithRevisionLog::create([
'type' => 'entity_test_revlog',
]);
$entity->setName('view all revisions');
$entity->save();
$this->drupalGet($entity->toUrl('version-history'));
$this->assertSession()
->elementsCount('css', 'table tbody tr', 1);
$this->assertSession()
->elementsCount('css', 'table tbody tr a', 0);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.