public function LingotekAccessFunctionalTest::testProjectOverrideProjectAccess in Lingotek Translation 7.7
Same name and namespace in other branches
- 7.2 tests/lingotek.access.test \LingotekAccessFunctionalTest::testProjectOverrideProjectAccess()
- 7.3 tests/lingotek.access.test \LingotekAccessFunctionalTest::testProjectOverrideProjectAccess()
- 7.4 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';
$lingotek_html = 'id="edit-lingotek-profile"';
// Privileged user can see the Lingotek Project override field.
$this
->drupalLogin($this->privileged_user);
$this
->drupalGet($node_add_path);
$this
->assertRaw($lingotek_html);
$this
->drupalLogout();
// Unprivileged user cannot see the field.
$this
->drupalLogin($this->unprivileged_user);
$this
->drupalGet($node_add_path);
$this
->assertNoRaw($lingotek_html);
$this
->drupalLogout();
}