예제 #1
0
 /**
  * Constructs an EncryptAdapter object.
  *
  * @param \League\Flysystem\AdapterInterface $adapter The adapter to encrypt.
  * @param \Defuse\Crypto\Key $key The encryption key.
  */
 public function __construct(AdapterInterface $adapter, Key $key)
 {
     $this->key($key);
     parent::__construct($adapter);
 }
 /**
  * @covers ::writeStream
  */
 public function testWriteStream()
 {
     $stream = fopen('data:text/plain,filecontent', 'r+b');
     $this->assertInternalType('array', $this->adapter->writeStream('file.txt', $stream, new Config()));
     fclose($stream);
 }