public function LingotekNodeTranslationTest::testCannotAssignProfileToContentWithoutRightPermission in Lingotek Translation 3.1.x
Same name and namespace in other branches
- 8.2 tests/src/Functional/LingotekNodeTranslationTest.php \Drupal\Tests\lingotek\Functional\LingotekNodeTranslationTest::testCannotAssignProfileToContentWithoutRightPermission()
- 4.0.x tests/src/Functional/LingotekNodeTranslationTest.php \Drupal\Tests\lingotek\Functional\LingotekNodeTranslationTest::testCannotAssignProfileToContentWithoutRightPermission()
- 3.0.x tests/src/Functional/LingotekNodeTranslationTest.php \Drupal\Tests\lingotek\Functional\LingotekNodeTranslationTest::testCannotAssignProfileToContentWithoutRightPermission()
- 3.2.x tests/src/Functional/LingotekNodeTranslationTest.php \Drupal\Tests\lingotek\Functional\LingotekNodeTranslationTest::testCannotAssignProfileToContentWithoutRightPermission()
- 3.3.x tests/src/Functional/LingotekNodeTranslationTest.php \Drupal\Tests\lingotek\Functional\LingotekNodeTranslationTest::testCannotAssignProfileToContentWithoutRightPermission()
- 3.4.x tests/src/Functional/LingotekNodeTranslationTest.php \Drupal\Tests\lingotek\Functional\LingotekNodeTranslationTest::testCannotAssignProfileToContentWithoutRightPermission()
- 3.5.x tests/src/Functional/LingotekNodeTranslationTest.php \Drupal\Tests\lingotek\Functional\LingotekNodeTranslationTest::testCannotAssignProfileToContentWithoutRightPermission()
- 3.6.x tests/src/Functional/LingotekNodeTranslationTest.php \Drupal\Tests\lingotek\Functional\LingotekNodeTranslationTest::testCannotAssignProfileToContentWithoutRightPermission()
- 3.7.x tests/src/Functional/LingotekNodeTranslationTest.php \Drupal\Tests\lingotek\Functional\LingotekNodeTranslationTest::testCannotAssignProfileToContentWithoutRightPermission()
- 3.8.x tests/src/Functional/LingotekNodeTranslationTest.php \Drupal\Tests\lingotek\Functional\LingotekNodeTranslationTest::testCannotAssignProfileToContentWithoutRightPermission()
Test that when a node is created we cannot assign a profile if using a restricted user.
File
- tests/
src/ Functional/ LingotekNodeTranslationTest.php, line 373
Class
- LingotekNodeTranslationTest
- Tests translating a node.
Namespace
Drupal\Tests\lingotek\FunctionalCode
public function testCannotAssignProfileToContentWithoutRightPermission() {
$editor = $this
->drupalCreateUser([
'bypass node access',
]);
// Login as editor.
$this
->drupalLogin($editor);
// Get the node form.
$this
->drupalGet('node/add/article');
// Assert translation profile cannot be assigned.
$this
->assertNoField('lingotek_translation_management[lingotek_translation_profile]');
$translation_manager = $this
->drupalCreateUser([
'bypass node access',
'assign lingotek translation profiles',
]);
// Login as translation manager.
$this
->drupalLogin($translation_manager);
// Get the node form.
$this
->drupalGet('node/add/article');
// Assert translation profile can be assigned.
$this
->assertField('lingotek_translation_management[lingotek_translation_profile]');
}