function RevisionRouteProviderTest::testOperationAccessOverview
Same name in other branches
- 10 core/tests/Drupal/KernelTests/Core/Entity/RevisionRouteProviderTest.php \Drupal\KernelTests\Core\Entity\RevisionRouteProviderTest::testOperationAccessOverview()
Tests revision access for revision overview.
Tests routes which do not need a specific revision parameter.
File
-
core/
tests/ Drupal/ KernelTests/ Core/ Entity/ RevisionRouteProviderTest.php, line 41
Class
- RevisionRouteProviderTest
- Tests revision route provider.
Namespace
Drupal\KernelTests\Core\EntityCode
public function testOperationAccessOverview() : void {
$entity = EntityTestRev::create()->setName('first revision');
$entity->save();
$this->assertFalse($entity->toUrl('version-history')
->access());
$entity->setName('view all revisions')
->setNewRevision();
$entity->save();
$this->assertTrue($entity->toUrl('version-history')
->access());
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.