public function CacheItemBackendTest::testSetIsLoaded in Flysystem 3.0.x
Same name and namespace in other branches
- 8 tests/src/Unit/Flysystem/Adapter/CacheItemBackendTest.php \Drupal\Tests\flysystem\Unit\Flysystem\Adapter\CacheItemBackendTest::testSetIsLoaded()
- 3.x tests/src/Unit/Flysystem/Adapter/CacheItemBackendTest.php \Drupal\Tests\flysystem\Unit\Flysystem\Adapter\CacheItemBackendTest::testSetIsLoaded()
- 2.0.x tests/src/Unit/Flysystem/Adapter/CacheItemBackendTest.php \Drupal\Tests\flysystem\Unit\Flysystem\Adapter\CacheItemBackendTest::testSetIsLoaded()
Tests loading a cache item from the cache.
File
- tests/
src/ Unit/ Flysystem/ Adapter/ CacheItemBackendTest.php, line 50
Class
- CacheItemBackendTest
- @group flysystem
Namespace
Drupal\Tests\flysystem\Unit\Flysystem\AdapterCode
public function testSetIsLoaded() {
$cache_item = new CacheItem();
$cache_item
->updateMetadata([
'mimetype' => 'test_mimetype',
]);
$this->cacheItemBackend
->set('test_path', $cache_item);
$metadata = $this->cacheItemBackend
->load('test_path')
->getMetadata();
$this
->assertSame('test_mimetype', $metadata['mimetype']);
}