public function PrivateTempStoreTest::testSetWithNoLockAvailable in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/user/tests/src/Unit/PrivateTempStoreTest.php \Drupal\Tests\user\Unit\PrivateTempStoreTest::testSetWithNoLockAvailable()
Tests the set() method with no lock available.
@covers ::set @expectedException \Drupal\user\TempStoreException
File
- core/
modules/ user/ tests/ src/ Unit/ PrivateTempStoreTest.php, line 131 - Contains \Drupal\Tests\user\Unit\PrivateTempStoreTest.
Class
- PrivateTempStoreTest
- @coversDefaultClass \Drupal\user\PrivateTempStore @group user
Namespace
Drupal\Tests\user\UnitCode
public function testSetWithNoLockAvailable() {
$this->lock
->expects($this
->at(0))
->method('acquire')
->with('1:test')
->will($this
->returnValue(FALSE));
$this->lock
->expects($this
->at(1))
->method('wait')
->with('1:test');
$this->lock
->expects($this
->at(2))
->method('acquire')
->with('1:test')
->will($this
->returnValue(FALSE));
$this->keyValue
->expects($this
->once())
->method('getCollectionName');
$this->tempStore
->set('test', 'value');
}