Example #1
0
 public function testFileIsDir()
 {
     $response = ['type' => 'file'];
     $prophecy = $this->prophesize('League\\Flysystem\\FilesystemInterface');
     $prophecy->getMetadata('path.txt')->willReturn($response);
     $filesystem = $prophecy->reveal();
     $file = new File();
     $file->setPath('path.txt');
     $file->setFilesystem($filesystem);
     $this->assertFalse($file->isDir());
 }
Example #2
0
 /**
  * @param FilesystemInterface $filesystem
  *
  * @return $this
  */
 public function setFilesystem(FilesystemInterface $filesystem)
 {
     $this->wrapper = new FilesystemWrapper($filesystem);
     return parent::setFilesystem($this->wrapper);
 }