public function LingotekAccessFunctionalTest::testProjectOverrideProjectAccess in Lingotek Translation 7.4
Same name and namespace in other branches
- 7.7 tests/lingotek.access.test \LingotekAccessFunctionalTest::testProjectOverrideProjectAccess()
- 7.2 tests/lingotek.access.test \LingotekAccessFunctionalTest::testProjectOverrideProjectAccess()
- 7.3 tests/lingotek.access.test \LingotekAccessFunctionalTest::testProjectOverrideProjectAccess()
- 7.5 tests/lingotek.access.test \LingotekAccessFunctionalTest::testProjectOverrideProjectAccess()
- 7.6 tests/lingotek.access.test \LingotekAccessFunctionalTest::testProjectOverrideProjectAccess()
Tests field access for the Lingotek project override field on node/add forms.
File
- tests/
lingotek.access.test, line 26 - Declares LingotekAccessFunctionalTest
Class
- LingotekAccessFunctionalTest
- A class containing access control-related tests.
Code
public function testProjectOverrideProjectAccess() {
$node_add_path = 'node/add/page';
$test_text = 'id="edit-lingotek-project-id"';
// Privileged user can see the Lingotek Project override field.
$this
->drupalLogin($this->privileged_user);
$this
->drupalGet('node/add/page');
$this
->assertText('Lingotek Translation Settings');
$this
->drupalLogout();
// Unprivileged user cannot see the field.
$this
->drupalLogin($this->unprivileged_user);
$this
->drupalGet($node_add_path);
$this
->assertNoText($test_text);
$this
->drupalLogout();
}