You are here

public function SharedTempStoreTest::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/SharedTempStoreTest.php, line 281

Class

SharedTempStoreTest
@coversDefaultClass \Drupal\Core\TempStore\SharedTempStore @group TempStore

Namespace

Drupal\Tests\Core\TempStore

Code

public function testGetMetadataOwner() {
  $this->keyValue
    ->expects($this
    ->once())
    ->method('get')
    ->with('test')
    ->will($this
    ->returnValue($this->ownObject));
  $metadata = $this->tempStore
    ->getMetadata('test');
  $this
    ->assertSame(1, $metadata->owner);
}