protected function ContentLockTimeoutTest::assertNoLockOnContent in Content locking (anti-concurrent editing) 8
Same name and namespace in other branches
- 8.2 modules/content_lock_timeout/tests/src/Functional/ContentLockTimeoutTest.php \Drupal\Tests\content_lock_timeout\Functional\ContentLockTimeoutTest::assertNoLockOnContent()
Assert if no lock is present for content.
Parameters
\Drupal\Core\Entity\EntityInterface $entity: The entity which should not have a lock.
1 call to ContentLockTimeoutTest::assertNoLockOnContent()
- ContentLockTimeoutTest::doTestForEntity in modules/
content_lock_timeout/ tests/ src/ Functional/ ContentLockTimeoutTest.php - Run the same tests for node, block and term.
File
- modules/
content_lock_timeout/ tests/ src/ Functional/ ContentLockTimeoutTest.php, line 305
Class
- ContentLockTimeoutTest
- Test content_lock_timeout sub module.
Namespace
Drupal\Tests\content_lock_timeout\FunctionalCode
protected function assertNoLockOnContent(EntityInterface $entity) {
$lock = $this->lockService
->fetchLock($entity
->id(), $entity
->language()
->getId(), 'edit', $entity
->getEntityTypeId());
$this
->assertFalse($lock, 'No lock present.');
}