function SharedTempStoreTest::setUpMockLock
Reinitializes the lock backend as a mock object.
6 calls to SharedTempStoreTest::setUpMockLock()
- SharedTempStoreTest::testDelete in core/
tests/ Drupal/ Tests/ Core/ TempStore/ SharedTempStoreTest.php - Tests the delete() method.
- SharedTempStoreTest::testDeleteIfOwner in core/
tests/ Drupal/ Tests/ Core/ TempStore/ SharedTempStoreTest.php - Tests the deleteIfOwner() method.
- SharedTempStoreTest::testDeleteWithNoLockAvailable in core/
tests/ Drupal/ Tests/ Core/ TempStore/ SharedTempStoreTest.php - Tests the delete() method with no lock available.
- SharedTempStoreTest::testSet in core/
tests/ Drupal/ Tests/ Core/ TempStore/ SharedTempStoreTest.php - Tests a successful set() call.
- SharedTempStoreTest::testSetIfOwner in core/
tests/ Drupal/ Tests/ Core/ TempStore/ SharedTempStoreTest.php - Tests the setIfOwner() method with matching and non matching owners.
File
-
core/
tests/ Drupal/ Tests/ Core/ TempStore/ SharedTempStoreTest.php, line 117
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.