You are here

public function DrupalCacheAdapterTest::testGetMetadataSuccess in Flysystem 2.0.x

Same name and namespace in other branches
  1. 8 tests/src/Unit/Flysystem/Adapter/DrupalCacheAdapterTest.php \Drupal\Tests\flysystem\Unit\Flysystem\Adapter\DrupalCacheAdapterTest::testGetMetadataSuccess()
  2. 3.x tests/src/Unit/Flysystem/Adapter/DrupalCacheAdapterTest.php \Drupal\Tests\flysystem\Unit\Flysystem\Adapter\DrupalCacheAdapterTest::testGetMetadataSuccess()
  3. 3.0.x tests/src/Unit/Flysystem/Adapter/DrupalCacheAdapterTest.php \Drupal\Tests\flysystem\Unit\Flysystem\Adapter\DrupalCacheAdapterTest::testGetMetadataSuccess()

File

tests/src/Unit/Flysystem/Adapter/DrupalCacheAdapterTest.php, line 228

Class

DrupalCacheAdapterTest
Test the Drupal Cache Adapter.

Namespace

Drupal\Tests\flysystem\Unit\Flysystem\Adapter

Code

public function testGetMetadataSuccess() {
  $cache_item = $this->cacheItemBackend
    ->load(static::FILE);
  $cache_item
    ->updateMetadata([
    'type' => 'dir',
  ]);
  $this->cacheItemBackend
    ->set(static::FILE, $cache_item);
  $this
    ->assertSame('dir', $this->cacheAdapter
    ->getMetadata(static::FILE)['type']);
}