function PrivateTempStoreTest::setUpMockLock
Reinitializes the lock backend as a mock object.
5 calls to PrivateTempStoreTest::setUpMockLock()
- PrivateTempStoreTest::testDelete in core/
tests/ Drupal/ Tests/ Core/ TempStore/ PrivateTempStoreTest.php - Tests the delete() method.
- PrivateTempStoreTest::testDeleteLocking in core/
tests/ Drupal/ Tests/ Core/ TempStore/ PrivateTempStoreTest.php - Tests the locking in the delete() method.
- PrivateTempStoreTest::testDeleteWithNoLockAvailable in core/
tests/ Drupal/ Tests/ Core/ TempStore/ PrivateTempStoreTest.php - Tests the delete() method with no lock available.
- PrivateTempStoreTest::testSet in core/
tests/ Drupal/ Tests/ Core/ TempStore/ PrivateTempStoreTest.php - Tests a successful set() call.
- PrivateTempStoreTest::testSetWithNoLockAvailable in core/
tests/ Drupal/ Tests/ Core/ TempStore/ PrivateTempStoreTest.php - Tests the set() method with no lock available.
File
-
core/
tests/ Drupal/ Tests/ Core/ TempStore/ PrivateTempStoreTest.php, line 107
Class
Namespace
Drupal\Tests\Core\TempStoreCode
protected function setUpMockLock() : void {
$this->lock = $this->createMock(LockBackendInterface::class);
$reflection = new \ReflectionProperty($this->tempStore, 'lockBackend');
$reflection->setValue($this->tempStore, $this->lock);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.