function SharedTempStoreTest::testSetIfOwnerNoObject
Tests the setIfOwner() method when a key already exists but no object.
@legacy-covers ::setIfOwner
File
-
core/
tests/ Drupal/ Tests/ Core/ TempStore/ SharedTempStoreTest.php, line 223
Class
Namespace
Drupal\Tests\Core\TempStoreCode
public function testSetIfOwnerNoObject() : void {
$this->keyValue
->expects($this->once())
->method('setWithExpireIfNotExists')
->willReturn(FALSE);
$this->keyValue
->expects($this->once())
->method('get')
->with('test')
->willReturn(FALSE);
$this->assertFalse($this->tempStore
->setIfOwner('test', 'test_data'));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.