Ejemplo n.º 1
0
 /**
  * This test documents the intended behaviour. The adapter attempts at no point, when using streams,
  * to load the file into memory.
  */
 public function testWriteToStreamFailsToDetectMimetypeByContent()
 {
     $this->setupBasicDbResponse();
     $content = base64_decode('R0lGODdhAQABAPAAAP///wAAACwAAAAAAQABAEACAkQBADs=');
     // 1x1 transparent gif
     $handle = $this->createTempResource($content);
     $meta = $this->adapter->writeStream('/missing-extension', $handle, $this->emptyConfig);
     $this->assertNotEquals('image/gif', $meta['mimetype']);
 }
Ejemplo n.º 2
0
 public function testCopyingProducesTheSameFile()
 {
     $path = '/this/path.txt';
     $file = $this->createResource(static::$tempFiles['10B']);
     $this->adapter->writeStream($path, $file, $this->emptyConfig);
 }