public function testIsInitializableWithFilesystemMap()
 {
     $map = new FilesystemMap();
     $map->set('one', $this->getFilesystemMock(), $this->getFileHandlerMock());
     $listener = new UploadableListener($map, $this->getFileHandlerMock());
     $this->assertSame($map->all(), $listener->getFilesystems());
 }
Example #2
0
 /**
  * @param Info $serviceArtistInfo
  * @param ArtistAlbum $serviceArtistAlbum
  * @param AlbumInfo $serviceAlbumInfo
  * @param $doctrineMongoDB
  */
 public function __construct(ArtistInfo $serviceArtistInfo, ArtistAlbum $serviceArtistAlbum, AlbumInfo $serviceAlbumInfo, $doctrineMongoDB, FilesystemMap $filesystemMap)
 {
     $this->serviceAlbumInfo = $serviceAlbumInfo;
     $this->serviceArtistAlbum = $serviceArtistAlbum;
     $this->serviceArtistInfo = $serviceArtistInfo;
     $this->artistQuery = new ArtistQuery($doctrineMongoDB->getManager());
     $this->fileSystem = $filesystemMap->get('local');
 }
 /**
  * @param \Gaufrette\FilesystemMap $map
  * @param \Gaufrette\Filesystem    $filesystem
  * @param \Gaufrette\Stream        $stream
  */
 function let($map, $filesystem, $stream)
 {
     $filesystem->createStream('filename')->willReturn($stream);
     $map->get('some')->willReturn($filesystem);
     $this->setFilesystemMap($map);
 }
Example #4
0
 public function getFilesystem()
 {
     return $this->fs_map->get('assets');
 }