public function PrivateTempStoreTest::testGetMetadataOwner in Drupal 8
@covers ::getMetadata @expectedDeprecation Using the "owner" public property of a TempStore lock is deprecated in Drupal 8.7.0 and will not be allowed in Drupal 9.0.0. Use \Drupal\Core\TempStore\Lock::getOwnerId() instead. See https://www.drupal.org/node/3025869. @group legacy
File
- core/
tests/ Drupal/ Tests/ Core/ TempStore/ PrivateTempStoreTest.php, line 200
Class
- PrivateTempStoreTest
- @coversDefaultClass \Drupal\Core\TempStore\PrivateTempStore @group TempStore
Namespace
Drupal\Tests\Core\TempStoreCode
public function testGetMetadataOwner() {
$this->keyValue
->expects($this
->once())
->method('get')
->with('1:test')
->will($this
->returnValue($this->ownObject));
$metadata = $this->tempStore
->getMetadata('test');
$this
->assertSame(1, $metadata->owner);
}