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