public function CacheItemBackendTest::testDelete in Flysystem 8
Same name and namespace in other branches
- 3.x tests/src/Unit/Flysystem/Adapter/CacheItemBackendTest.php \Drupal\Tests\flysystem\Unit\Flysystem\Adapter\CacheItemBackendTest::testDelete()
- 2.0.x tests/src/Unit/Flysystem/Adapter/CacheItemBackendTest.php \Drupal\Tests\flysystem\Unit\Flysystem\Adapter\CacheItemBackendTest::testDelete()
- 3.0.x tests/src/Unit/Flysystem/Adapter/CacheItemBackendTest.php \Drupal\Tests\flysystem\Unit\Flysystem\Adapter\CacheItemBackendTest::testDelete()
Tests deleting by a path.
File
- tests/
src/ Unit/ Flysystem/ Adapter/ CacheItemBackendTest.php, line 70
Class
- CacheItemBackendTest
- @group flysystem
Namespace
Drupal\Tests\flysystem\Unit\Flysystem\AdapterCode
public function testDelete() {
$cache_item = new CacheItem();
$cache_item
->updateMetadata([
'mimetype' => 'test_mimetype',
]);
$this->cacheItemBackend
->set('test_path', $cache_item);
$this->cacheItemBackend
->delete('test_path');
$metadata = $this->cacheItemBackend
->load('test_path')
->getMetadata();
$this
->assertTrue(empty($metadata['mimetype']));
}