/**
  * @covers ::writeStream
  */
 public function testWriteStream()
 {
     $stream = fopen('data:text/plain,newfilecontent', 'r+b');
     $this->adapter->writeStream('test.png', $stream, new Config());
     // Test that the adapter gets the encrypted content.
     $mem = $this->memory->read('test.png');
     $this->assertSame('newfilecontent', $this->decrypt($mem['contents']));
     fclose($stream);
 }
 /**
  * @inheritdoc
  */
 public function setUp()
 {
     $this->memory = new MemoryAdapter();
     $this->memory->write('file.txt', 'file content', new Config());
     $this->adapter = new PassthroughAdapter($this->memory);
 }