function StorageTestBase::testRenameNoChange
Same name in other branches
- 9 core/tests/Drupal/KernelTests/Core/KeyValueStore/StorageTestBase.php \Drupal\KernelTests\Core\KeyValueStore\StorageTestBase::testRenameNoChange()
- 11.x core/tests/Drupal/KernelTests/Core/KeyValueStore/StorageTestBase.php \Drupal\KernelTests\Core\KeyValueStore\StorageTestBase::testRenameNoChange()
Tests the rename operation.
File
-
core/
tests/ Drupal/ KernelTests/ Core/ KeyValueStore/ StorageTestBase.php, line 200
Class
- StorageTestBase
- Base class for testing key-value storages.
Namespace
Drupal\KernelTests\Core\KeyValueStoreCode
public function testRenameNoChange() : void {
$stores = $this->createStorage();
$store = $stores[0];
$store->set('old', 'thing');
$this->assertSame($store->get('old'), 'thing');
$store->rename('old', 'old');
$this->assertSame($store->get('old'), 'thing');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.