public function PrivateTempStoreTest::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/ PrivateTempStoreTest.php, line 215
Class
- PrivateTempStoreTest
- @coversDefaultClass \Drupal\Core\TempStore\PrivateTempStore @group TempStore
Namespace
Drupal\Tests\Core\TempStoreCode
public function testGetMetadataUpdated() {
$this->keyValue
->expects($this
->once())
->method('get')
->with('1:test')
->will($this
->returnValue($this->ownObject));
$metadata = $this->tempStore
->getMetadata('test');
$this
->assertSame($metadata
->getUpdated(), $metadata->updated);
}