function RevisionVersionHistoryTest::testDescriptionNoRevLogNoLabelAccess
Same name in other branches
- 10 core/tests/Drupal/FunctionalTests/Entity/RevisionVersionHistoryTest.php \Drupal\FunctionalTests\Entity\RevisionVersionHistoryTest::testDescriptionNoRevLogNoLabelAccess()
Test description with entity, without revision log, no label access.
@covers ::getRevisionDescription
File
-
core/
tests/ Drupal/ FunctionalTests/ Entity/ RevisionVersionHistoryTest.php, line 138
Class
- RevisionVersionHistoryTest
- Tests version history page.
Namespace
Drupal\FunctionalTests\EntityCode
public function testDescriptionNoRevLogNoLabelAccess() : void {
/** @var \Drupal\entity_test\Entity\EntityTestRev $entity */
$entity = EntityTestRev::create([
'type' => 'entity_test_rev',
]);
$entity->setName('view all revisions');
$entity->save();
$this->drupalGet($entity->toUrl('version-history'));
$this->assertSession()
->elementTextContains('css', 'table tbody tr:nth-child(1)', '- Restricted access -');
$this->assertSession()
->elementTextNotContains('css', 'table tbody tr:nth-child(1)', $entity->getName());
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.