public function SharedTempStoreTest::testGetMetadataUpdated in Drupal 8
@covers ::getMetadata @expectedDeprecation Using the "updated" 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::getUpdated() instead. See https://www.drupal.org/node/3025869. @group legacy
File
- core/
tests/ Drupal/ Tests/ Core/ TempStore/ SharedTempStoreTest.php, line 296
Class
- SharedTempStoreTest
- @coversDefaultClass \Drupal\Core\TempStore\SharedTempStore @group TempStore
Namespace
Drupal\Tests\Core\TempStoreCode
public function testGetMetadataUpdated() {
$this->keyValue
->expects($this
->once())
->method('get')
->with('test')
->will($this
->returnValue($this->ownObject));
$metadata = $this->tempStore
->getMetadata('test');
$this
->assertSame($metadata
->getUpdated(), $metadata->updated);
}