public function DrupalCacheAdapterTest::testWriteSuccess in Flysystem 3.0.x
Same name and namespace in other branches
- 8 tests/src/Unit/Flysystem/Adapter/DrupalCacheAdapterTest.php \Drupal\Tests\flysystem\Unit\Flysystem\Adapter\DrupalCacheAdapterTest::testWriteSuccess()
- 3.x tests/src/Unit/Flysystem/Adapter/DrupalCacheAdapterTest.php \Drupal\Tests\flysystem\Unit\Flysystem\Adapter\DrupalCacheAdapterTest::testWriteSuccess()
- 2.0.x tests/src/Unit/Flysystem/Adapter/DrupalCacheAdapterTest.php \Drupal\Tests\flysystem\Unit\Flysystem\Adapter\DrupalCacheAdapterTest::testWriteSuccess()
File
- tests/
src/ Unit/ Flysystem/ Adapter/ DrupalCacheAdapterTest.php, line 66
Class
- DrupalCacheAdapterTest
- Test the Drupal Cache Adapter.
Namespace
Drupal\Tests\flysystem\Unit\Flysystem\AdapterCode
public function testWriteSuccess() {
$config = new Config();
$this->adapter
->write(static::FILE, 'contents', $config)
->willReturn([
'visibility' => 'public',
]);
$metadata = $this->cacheAdapter
->write(static::FILE, 'contents', $config);
$this
->assertSame('public', $metadata['visibility']);
$this
->assertSame('public', $this->cacheAdapter
->getVisibility(static::FILE)['visibility']);
$this
->assertTrue($this->cacheItemBackend
->has(static::FILE));
}