function ContentLockTestCase::testLockingNotAllowed in Content locking (anti-concurrent editing) 6
File
- tests/
content_lock.test, line 51 - Backport of Drupal 7 block.test with modifications, see BACKPORT.txt.
Class
- ContentLockTestCase
- @file Backport of Drupal 7 block.test with modifications, see BACKPORT.txt.
Code
function testLockingNotAllowed() {
// Add a new box by filling out the input form on the admin/build/block/add page.
$author = $this
->drupalCreateUser(array(
'edit any page content',
));
$this
->drupalLogin($author);
$n = $this
->DrupalCreateNode(array(
'type' => 'page',
));
$this
->drupalGet('node/' . $n->nid . '/edit');
$this
->assertTrue($this
->_checkLock($n->nid, false), 'Edit lock is not set, when user is editing and has no "checkout out decuments" permission');
}