You are here

public function StorageTestBase::testRenameNoChange in Drupal 10

Tests the rename operation.

File

core/tests/Drupal/KernelTests/Core/KeyValueStore/StorageTestBase.php, line 195

Class

StorageTestBase
Base class for testing key-value storages.

Namespace

Drupal\KernelTests\Core\KeyValueStore

Code

public function testRenameNoChange() {
  $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');
}