You are here

protected function ContentLockTestCase::_checkLock in Content locking (anti-concurrent editing) 6

2 calls to ContentLockTestCase::_checkLock()
ContentLockTestCase::testLocking in tests/content_lock.test
ContentLockTestCase::testLockingNotAllowed in tests/content_lock.test

File

tests/content_lock.test, line 63
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

protected function _checkLock($nid, $bool) {
  $lock = content_lock_fetch_lock($nid);
  if (is_object($lock) && $bool) {
    return true;
  }
  else {
    if ($lock === false && $bool === false) {
      return true;
    }
  }

  // else
  return true;
}