public function UpgradeStatusUiTest::testRoleChecking in Upgrade Status 8.3
Test the user interface for role checking.
File
- tests/
src/ Functional/ UpgradeStatusUiTest.php, line 122
Class
- UpgradeStatusUiTest
- Tests the UI before and after running scans.
Namespace
Drupal\Tests\upgrade_status\FunctionalCode
public function testRoleChecking() {
if ($this
->getDrupalCoreMajorVersion() == 9) {
$authenticated = Role::load('authenticated');
$authenticated
->grantPermission('upgrade status invalid permission test');
$authenticated
->save();
$this
->drupalGet(Url::fromRoute('upgrade_status.report'));
$this
->assertSession()
->pageTextContains('"upgrade status invalid permission test" of user role: "Authenticated user".');
}
}