public function LingotekManageLingotekTranslationsPermissionTest::testCannotSeeSettingsTabWithoutRightPermission in Lingotek Translation 3.7.x
Same name and namespace in other branches
- 8.2 tests/src/Functional/LingotekManageLingotekTranslationsPermissionTest.php \Drupal\Tests\lingotek\Functional\LingotekManageLingotekTranslationsPermissionTest::testCannotSeeSettingsTabWithoutRightPermission()
- 4.0.x tests/src/Functional/LingotekManageLingotekTranslationsPermissionTest.php \Drupal\Tests\lingotek\Functional\LingotekManageLingotekTranslationsPermissionTest::testCannotSeeSettingsTabWithoutRightPermission()
- 3.0.x tests/src/Functional/LingotekManageLingotekTranslationsPermissionTest.php \Drupal\Tests\lingotek\Functional\LingotekManageLingotekTranslationsPermissionTest::testCannotSeeSettingsTabWithoutRightPermission()
- 3.1.x tests/src/Functional/LingotekManageLingotekTranslationsPermissionTest.php \Drupal\Tests\lingotek\Functional\LingotekManageLingotekTranslationsPermissionTest::testCannotSeeSettingsTabWithoutRightPermission()
- 3.2.x tests/src/Functional/LingotekManageLingotekTranslationsPermissionTest.php \Drupal\Tests\lingotek\Functional\LingotekManageLingotekTranslationsPermissionTest::testCannotSeeSettingsTabWithoutRightPermission()
- 3.3.x tests/src/Functional/LingotekManageLingotekTranslationsPermissionTest.php \Drupal\Tests\lingotek\Functional\LingotekManageLingotekTranslationsPermissionTest::testCannotSeeSettingsTabWithoutRightPermission()
- 3.4.x tests/src/Functional/LingotekManageLingotekTranslationsPermissionTest.php \Drupal\Tests\lingotek\Functional\LingotekManageLingotekTranslationsPermissionTest::testCannotSeeSettingsTabWithoutRightPermission()
- 3.5.x tests/src/Functional/LingotekManageLingotekTranslationsPermissionTest.php \Drupal\Tests\lingotek\Functional\LingotekManageLingotekTranslationsPermissionTest::testCannotSeeSettingsTabWithoutRightPermission()
- 3.6.x tests/src/Functional/LingotekManageLingotekTranslationsPermissionTest.php \Drupal\Tests\lingotek\Functional\LingotekManageLingotekTranslationsPermissionTest::testCannotSeeSettingsTabWithoutRightPermission()
- 3.8.x tests/src/Functional/LingotekManageLingotekTranslationsPermissionTest.php \Drupal\Tests\lingotek\Functional\LingotekManageLingotekTranslationsPermissionTest::testCannotSeeSettingsTabWithoutRightPermission()
Test that if user can see settings tab without right permissions
File
- tests/
src/ Functional/ LingotekManageLingotekTranslationsPermissionTest.php, line 61
Class
- LingotekManageLingotekTranslationsPermissionTest
- Tests different permissions of the Lingotek module.
Namespace
Drupal\Tests\lingotek\FunctionalCode
public function testCannotSeeSettingsTabWithoutRightPermission() {
$assert_session = $this
->assertSession();
$user = $this
->drupalCreateUser([
'administer lingotek',
'assign lingotek translation profiles',
'manage lingotek translations',
]);
// Login as user.
$this
->drupalLogin($user);
// Get the settings form.
$this
->drupalGet('admin/lingotek/settings');
// Assert translation profile can be assigned.
$this
->assertNoText('You are not authorized to access this page.');
$user = $this
->drupalCreateUser([
'assign lingotek translation profiles',
'manage lingotek translations',
]);
// Login as user.
$this
->drupalLogin($user);
// Get the settings form.
$this
->drupalGet('admin/lingotek/settings');
// Assert translation profile cannot be assigned.
$this
->assertText('You are not authorized to access this page.');
}